Skip to content

Repository files navigation

Vello

High-performance 2D renderers written in Rust

Linebender Zulip dependency status Apache 2.0 or MIT license. Build status

Vello is a project for high-performance 2D vector rendering. It contains three renderer implementations with different hardware requirements and maturity profiles.

Choose a renderer

Vello CPU

vello_cpu is a CPU-only renderer optimized for multithreading and SIMD. It is the most mature choice when predictable CPU rendering, software rendering, or support for devices without a suitable GPU is required.

Vello GPU

vello_gpu is a renderer that preprocesses paths on the CPU and uses the GPU for rasterization and compositing. It supports a native WebGL2 backend and a wgpu backend without requiring compute shaders. Choose it when GPU acceleration and broad GPU compatibility are important. Vello GPU is intended to become the primary renderer for production GPU use cases as it matures; Vello CPU is currently overall more mature.

Vello compute renderer

The vello crate is the original compute-centric renderer. It performs most rendering work in GPU compute shaders and remains an experimental implementation for compute-capable GPUs. Its source and supporting crates live under research/.

Vello CPU and Vello GPU share the Sparse Strips architecture and common infrastructure in vello_common. See ARCHITECTURE.md for how the renderer families differ.

Quick start

Run the windowed example for the renderer you want to try:

# Vello CPU
cargo run -p vello_cpu_winit --release

# Vello GPU
cargo run -p vello_gpu_winit --release

# Compute-centric research renderer
cargo run -p with_winit --release

Package-specific setup and API examples are in the vello_cpu, vello_gpu, and vello READMEs.

Repository layout

  • vello_cpu/ and vello_gpu/ contain the user-facing Sparse Strips renderers.
  • vello_common/ and vello_gpu_shaders/ support those renderers.
  • glifo/ provides text and glyph-run support shared by both Sparse Strips renderers.
  • vello_tests/ contains their shared development tests, snapshots, scenes, and browser tooling.
  • research/ contains the compute-centric renderer, its encoding and shader crates, examples, tests, historical design documents, and changelog.
  • vello_bench/ contains Sparse Strips benchmarks.

Release histories are maintained in the vello changelog, vello_cpu changelog, vello_gpu changelog, and vello_common changelog.

Motivation

Vello is intended to fill the same place in the graphics stack as vector renderers such as Skia, Cairo, and its predecessor project Piet. Its renderers draw shapes, images, gradients, and text using a PostScript-inspired imaging model like those behind SVG and the browser <canvas> element.

The implementations explore complementary ways to use SIMD, multithreading, and GPUs while sharing the same broader rendering goals.

Minimum supported Rust Version (MSRV)

This version of Vello has been verified to compile with Rust 1.89 and later.

Future versions of Vello might increase the Rust version requirement. It will not be treated as a breaking change and as such can even happen with small patch releases.

Click here if compiling fails.

As time has passed, some of Vello's dependencies could have released versions with a higher Rust requirement. If you encounter a compilation issue due to a dependency and don't want to upgrade your Rust toolchain, then you could downgrade the dependency.

# Use the problematic dependency's name and version
cargo update -p package_name --precise 0.1.1

Community

Discussion of Vello development happens in the Linebender Zulip, specifically the #vello channel. All public content can be read without logging in.

Contributions are welcome by pull request. The Rust code of conduct applies.

Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache 2.0 license, shall be licensed as noted in the License section, without any additional terms or conditions.

License

Licensed under either of

at your option.

In addition, all files in the research/vello_shaders/shader and research/vello_shaders/src/cpu directories and subdirectories thereof are alternatively licensed under the Unlicense (research/vello_shaders/shader/UNLICENSE or http://unlicense.org/). For clarity, these files are also licensed under either of the above licenses. The intent is for this research to be used in as broad a context as possible.

The files in subdirectories of the assets directory are licensed solely under their respective licenses, available in the LICENSE file in their directories.

About

A GPU compute-centric 2D renderer.

Resources

Stars

4.3k stars

Watchers

71 watching

Forks

Releases

Used by

Contributors

Languages