{"id":13477634,"url":"https://github.com/linebender/vello","last_synced_at":"2026-01-16T07:28:33.626Z","repository":{"id":37104904,"uuid":"255966443","full_name":"linebender/vello","owner":"linebender","description":"A GPU compute-centric 2D renderer.","archived":false,"fork":false,"pushed_at":"2025-05-08T12:27:44.000Z","size":9138,"stargazers_count":2749,"open_issues_count":89,"forks_count":158,"subscribers_count":67,"default_branch":"main","last_synced_at":"2025-05-08T12:27:48.656Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"http://linebender.org/vello/","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/linebender.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE-APACHE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":"AUTHORS","dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2020-04-15T15:54:36.000Z","updated_at":"2025-05-08T09:17:27.000Z","dependencies_parsed_at":"2023-10-02T23:21:13.555Z","dependency_job_id":"dc26fdc7-a118-45c3-8a99-d19b4c58fba5","html_url":"https://github.com/linebender/vello","commit_stats":null,"previous_names":[],"tags_count":6,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/linebender%2Fvello","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/linebender%2Fvello/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/linebender%2Fvello/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/linebender%2Fvello/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/linebender","download_url":"https://codeload.github.com/linebender/vello/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253071080,"owners_count":21849296,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-07-31T16:01:45.445Z","updated_at":"2026-01-16T07:28:33.614Z","avatar_url":"https://github.com/linebender.png","language":"Rust","funding_links":[],"categories":["Rust","2D renderer"],"sub_categories":["Rust 2D renderer"],"readme":"\u003c!--\n\nThis repo-level readme needs restructuring, pending some Linebender templating decisions.\nhttps://xi.zulipchat.com/#narrow/channel/419691-linebender/topic/Bikeshedding.20badges/with/452312397\n\nFor now, prefer updating the package-level readmes, e.g. vello/README.md.\n\n--\u003e\n\n\u003cdiv align=\"center\"\u003e\n\n# Vello\n\n**A GPU compute-centric 2D renderer**\n\n[![Linebender Zulip](https://img.shields.io/badge/Linebender-%23vello-blue?logo=Zulip)](https://xi.zulipchat.com/#narrow/channel/197075-vello)\n[![dependency status](https://deps.rs/repo/github/linebender/vello/status.svg)](https://deps.rs/repo/github/linebender/vello)\n[![Apache 2.0 or MIT license.](https://img.shields.io/badge/license-Apache--2.0_OR_MIT-blue.svg)](#license)\n[![wgpu version](https://img.shields.io/badge/wgpu-v27.0.1-orange.svg)](https://crates.io/crates/wgpu)\n\n[![Crates.io](https://img.shields.io/crates/v/vello.svg)](https://crates.io/crates/vello)\n[![Docs](https://docs.rs/vello/badge.svg)](https://docs.rs/vello)\n[![Build status](https://github.com/linebender/vello/workflows/CI/badge.svg)](https://github.com/linebender/vello/actions)\n\n\u003c/div\u003e\n\nVello is a 2D graphics rendering engine written in Rust, with a focus on GPU compute.\nIt can draw large 2D scenes with interactive or near-interactive performance, using [`wgpu`] for GPU access.\n\nQuickstart to run an example program:\n\n```shell\ncargo run -p with_winit\n```\n\n![image](https://github.com/linebender/vello/assets/8573618/cc2b742e-2135-4b70-8051-c49aeddb5d19)\n\nIt is used as the rendering backend for [Xilem], a Rust GUI toolkit.\n\n\u003e [!WARNING]\n\u003e Vello can currently be considered in an alpha state. In particular, we're still working on the following:\n\u003e\n\u003e - [Implementing blur and filter effects](https://github.com/linebender/vello/issues/476).\n\u003e - [Conflations artifacts](https://github.com/linebender/vello/issues/49).\n\u003e - [GPU memory allocation strategy](https://github.com/linebender/vello/issues/366)\n\u003e - [Glyph caching](https://github.com/linebender/vello/issues/204)\n\nSignificant changes are documented in [the changelog].\n\n## Motivation\n\nVello is meant to fill the same place in the graphics stack as other vector graphics renderers like [Skia](https://skia.org/), [Cairo](https://www.cairographics.org/), and its predecessor project [Piet](https://github.com/linebender/piet).\nOn a basic level, that means it provides tools to render shapes, images, gradients, text, etc, using a PostScript-inspired API, the same that powers SVG files and [the browser `\u003ccanvas\u003e` element](https://developer.mozilla.org/en-US/docs/Web/API/CanvasRenderingContext2D).\n\nVello's selling point is that it gets better performance than other renderers by better leveraging the GPU.\nIn traditional PostScript-style renderers, some steps of the render process like sorting and clipping either need to be handled in the CPU or done through the use of intermediary textures.\nVello avoids this by using prefix-sum algorithms to parallelize work that usually needs to happen in sequence, so that work can be offloaded to the GPU with minimal use of temporary buffers.\n\nThis means that Vello needs a GPU with support for compute shaders to run.\n\n## Getting started\n\nVello is meant to be integrated deep in UI render stacks.\nWhile drawing in a Vello scene is easy, actually rendering that scene to a surface requires setting up a wgpu context, which is a non-trivial task.\n\nTo use Vello as the renderer for your PDF reader / GUI toolkit / etc, your code will have to look roughly like this:\n\n```rust\nuse vello::{\n    kurbo::{Affine, Circle},\n    peniko::{Color, Fill},\n    *,\n};\n\n// Initialize wgpu and get handles\nlet (width, height) = ...;\nlet device: wgpu::Device = ...;\nlet queue: wgpu::Queue = ...;\nlet mut renderer = Renderer::new(\n   \u0026device,\n   RendererOptions::default()\n).expect(\"Failed to create renderer\");\n// Create scene and draw stuff in it\nlet mut scene = vello::Scene::new();\nscene.fill(\n   vello::peniko::Fill::NonZero,\n   vello::Affine::IDENTITY,\n   vello::Color::from_rgb8(242, 140, 168),\n   None,\n   \u0026vello::Circle::new((420.0, 200.0), 120.0),\n);\n// Draw more stuff\nscene.push_layer(...);\nscene.fill(...);\nscene.stroke(...);\nscene.pop_layer(...);\nlet texture = device.create_texture(\u0026...);\n\n// Render to a wgpu Texture\nrenderer\n   .render_to_texture(\n      \u0026device,\n      \u0026queue,\n      \u0026scene,\n      \u0026texture,\n      \u0026vello::RenderParams {\n         base_color: palette::css::BLACK, // Background color\n         width,\n         height,\n         antialiasing_method: AaConfig::Msaa16,\n      },\n   )\n   .expect(\"Failed to render to a texture\");\n// Do things with `texture`, such as blitting it to the Surface using\n// wgpu::util::TextureBlitter\n```\n\nSee the [`examples`](https://github.com/linebender/vello/tree/main/examples) directory for code that integrates with frameworks like winit.\n\n## Performance\n\nWe've observed 177 fps for the paris-30k test scene on an M1 Max, at a resolution of 1600 pixels square, which is excellent performance and represents something of a best case for the engine.\n\nMore formal benchmarks are on their way.\n\n## Integrations\n\n### SVG\n\nA separate Linebender integration for rendering SVG files is available through [`vello_svg`](https://github.com/linebender/vello_svg).\n\n### Lottie\n\nA separate Linebender integration for playing Lottie animations is available through [`velato`](https://github.com/linebender/velato).\n\n### Bevy\n\nA separate Linebender integration for rendering raw scenes or Lottie and SVG files in [Bevy] through [`bevy_vello`](https://github.com/linebender/bevy_vello).\n\n## Examples\n\nOur examples are provided in separate packages in the [`examples`](https://github.com/linebender/vello/tree/main/examples) directory.\nThis allows them to have independent dependencies and faster builds.\nExamples must be selected using the `--package` (or `-p`) Cargo flag.\n\n### Winit\n\nOur [winit] example ([examples/with_winit](https://github.com/linebender/vello/tree/main/examples/with_winit)) demonstrates rendering to a [winit] window.\nBy default, this renders the [GhostScript Tiger] as well as all SVG files you add in the [examples/assets/downloads](https://github.com/linebender/vello/tree/main/examples/assets/downloads) directory.\nA custom list of SVG file paths (and directories to render all SVG files from) can be provided as arguments instead.\nIt also includes a collection of test scenes showing the capabilities of `vello`, which can be shown with `--test-scenes`.\n\n```shell\ncargo run -p with_winit\n```\n\n\u003c!-- ### Headless --\u003e\n\n## Platforms\n\nWe aim to target all environments which can support WebGPU with the [default limits](https://www.w3.org/TR/webgpu/#limits).\nWe defer to [`wgpu`] for this support.\nOther platforms are more tricky, and may require special building/running procedures.\n\n### Web\n\nBecause Vello relies heavily on compute shaders, we rely on the emerging WebGPU standard to run on the web.\nBrowser support for WebGPU is still evolving.\nVello has been tested using production versions of Chrome, but WebGPU support in Firefox and Safari is still experimental.\nIt may be necessary to use development browsers and explicitly enable WebGPU.\n\nThe following command builds and runs a web version of the [winit demo](#winit).\nThis uses [`cargo-run-wasm`](https://github.com/rukai/cargo-run-wasm) to build the example for web, and host a local server for it\n\n```shell\n# Make sure the Rust toolchain supports the wasm32 target\nrustup target add wasm32-unknown-unknown\n\n# The binary name must also be explicitly provided as it differs from the package name\ncargo run_wasm -p with_winit --bin with_winit_bin\n```\n\nThere is also a web demo [available here](https://linebender.github.io/vello) on supporting web browsers.\n\n\u003e [!WARNING]\n\u003e The web is not currently a primary target for Vello, and WebGPU implementations are incomplete, so you might run into issues running this example.\n\n### Android\n\nThe [`with_winit`](#winit) example supports running on Android, using [cargo apk](https://crates.io/crates/cargo-apk).\n\n```shell\ncargo apk run -p with_winit --lib\n```\n\n\u003e [!TIP]\n\u003e cargo apk doesn't support running in release mode without configuration.\n\u003e See [their crates page docs](https://crates.io/crates/cargo-apk) (around `package.metadata.android.signing.\u003cprofile\u003e`).\n\u003e\n\u003e See also [cargo-apk#16](https://github.com/rust-mobile/cargo-apk/issues/16).\n\u003e To run in release mode, you must add the following to `examples/with_winit/Cargo.toml` (changing `$HOME` to your home directory):\n\n```toml\n[package.metadata.android.signing.release]\npath = \"$HOME/.android/debug.keystore\"\nkeystore_password = \"android\"\n```\n\n\u003e [!NOTE]\n\u003e As `cargo apk` does not allow passing command line arguments or environment variables to the app when ran, these can be embedded into the\n\u003e program at compile time (currently for Android only)\n\u003e `with_winit` currently supports the environment variables:\n\u003e\n\u003e - `VELLO_STATIC_LOG`, which is equivalent to `RUST_LOG`\n\u003e - `VELLO_STATIC_ARGS`, which is equivalent to passing in command line arguments\n\nFor example (with unix shell environment variable syntax):\n\n```sh\nVELLO_STATIC_LOG=\"vello=trace\" VELLO_STATIC_ARGS=\"--test-scenes\" cargo apk run -p with_winit --lib\n```\n\n## Minimum supported Rust Version (MSRV)\n\nThis version of Vello has been verified to compile with **Rust 1.86** and later.\n\nFuture versions of Vello might increase the Rust version requirement.\nIt will not be treated as a breaking change and as such can even happen with small patch releases.\n\n\u003cdetails\u003e\n\u003csummary\u003eClick here if compiling fails.\u003c/summary\u003e\n\nAs time has passed, some of Vello's dependencies could have released versions with a higher Rust requirement.\nIf you encounter a compilation issue due to a dependency and don't want to upgrade your Rust toolchain, then you could downgrade the dependency.\n\n```sh\n# Use the problematic dependency's name and version\ncargo update -p package_name --precise 0.1.1\n```\n\n\u003c/details\u003e\n\n## Community\n\nDiscussion of Vello development happens in the [Linebender Zulip](https://xi.zulipchat.com/), specifically the [#vello channel](https://xi.zulipchat.com/#narrow/channel/197075-vello).\nAll public content can be read without logging in.\n\nContributions are welcome by pull request.\nThe [Rust code of conduct] applies.\n\nUnless 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](#license) section, without any additional terms or conditions.\n\n## History\n\nVello was previously known as `piet-gpu`.\nThis prior incarnation used a custom cross-API hardware abstraction layer, called `piet-gpu-hal`, instead of [`wgpu`].\n\nAn archive of this version can be found in the branches [`custom-hal-archive-with-shaders`] and [`custom-hal-archive`].\nThis succeeded the previous prototype, [piet-metal], and included work adapted from [piet-dx12].\n\nThe decision to lay down `piet-gpu-hal` in favor of WebGPU is discussed in detail in the blog post [Requiem for piet-gpu-hal].\n\nA [vision](https://github.com/linebender/vello/tree/main/doc/vision.md) document dated December 2020 explained the longer-term goals of the project, and how we might get there.\nMany of these items are out-of-date or completed, but it still may provide some useful background.\n\n## Related projects\n\nVello takes inspiration from many other rendering projects, including:\n\n- [Pathfinder](https://github.com/servo/pathfinder)\n- [Spinel](https://fuchsia.googlesource.com/fuchsia/+/refs/heads/master/src/graphics/lib/compute/spinel/)\n- [Forma](https://github.com/google/forma)\n- [Massively Parallel Vector Graphics](https://w3.impa.br/~diego/projects/GanEtAl14/)\n- [Random-access rendering of general vector graphics](https://hhoppe.com/proj/ravg/)\n\n## License\n\nLicensed under either of\n\n- Apache License, Version 2.0 ([LICENSE-APACHE](LICENSE-APACHE) or \u003chttp://www.apache.org/licenses/LICENSE-2.0\u003e)\n- MIT license ([LICENSE-MIT](LICENSE-MIT) or \u003chttp://opensource.org/licenses/MIT\u003e)\n\nat your option.\n\nIn addition, all files in the [`vello_shaders/shader`](https://github.com/linebender/vello/tree/main/vello_shaders/shader) and [`vello_shaders/src/cpu`](https://github.com/linebender/vello/tree/main/vello_shaders/src/cpu) directories and subdirectories thereof are alternatively licensed under the Unlicense ([vello_shaders/shader/UNLICENSE](https://github.com/linebender/vello/tree/main/vello_shaders/shader/UNLICENSE) or \u003chttp://unlicense.org/\u003e).\nFor clarity, these files are also licensed under either of the above licenses.\nThe intent is for this research to be used in as broad a context as possible.\n\nThe files in subdirectories of the [`examples/assets`](https://github.com/linebender/vello/tree/main/examples/assets) directory are licensed solely under their respective licenses, available in the `LICENSE` file in their directories.\n\n[piet-metal]: https://github.com/linebender/piet-metal\n[`wgpu`]: https://wgpu.rs/\n[Xilem]: https://github.com/linebender/xilem/\n[Rust code of conduct]: https://www.rust-lang.org/policies/code-of-conduct\n[`custom-hal-archive-with-shaders`]: https://github.com/linebender/piet-gpu/tree/custom-hal-archive-with-shaders\n[`custom-hal-archive`]: https://github.com/linebender/piet-gpu/tree/custom-hal-archive\n[piet-dx12]: https://github.com/bzm3r/piet-dx12\n[GhostScript tiger]: https://commons.wikimedia.org/wiki/File:Ghostscript_Tiger.svg\n[winit]: https://github.com/rust-windowing/winit\n[Bevy]: https://bevyengine.org/\n[Requiem for piet-gpu-hal]: https://raphlinus.github.io/rust/gpu/2023/01/07/requiem-piet-gpu-hal.html\n[the changelog]: https://github.com/linebender/vello/tree/main/CHANGELOG.md\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flinebender%2Fvello","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flinebender%2Fvello","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flinebender%2Fvello/lists"}