5 releases (3 breaking)

0.4.0 Oct 6, 2024
0.3.1 Jul 29, 2024
0.2.0 May 26, 2024
0.1.1 May 25, 2024
0.1.0 Mar 12, 2024

#67 in Rendering

Download history 544/week @ 2024-07-26 1800/week @ 2024-08-02 810/week @ 2024-08-09 218/week @ 2024-08-16 213/week @ 2024-08-23 439/week @ 2024-08-30 261/week @ 2024-09-06 220/week @ 2024-09-13 594/week @ 2024-09-20 757/week @ 2024-09-27 1333/week @ 2024-10-04 402/week @ 2024-10-11 461/week @ 2024-10-18 350/week @ 2024-10-25 715/week @ 2024-11-01 632/week @ 2024-11-08

2,260 downloads per month
Used in 3 crates (2 directly)

Apache-2.0 OR MIT

135KB
390 lines

Vello SVG

An integration to parse and render SVG with Vello.

Linebender Zulip dependency status MIT/Apache 2.0 vello version
Crates.io Docs Build status

[!WARNING] The goal of this crate is to provide decent coverage of the (large) SVG spec, up to what vello will support, for use in interactive graphics. If you are looking for a correct SVG renderer, see resvg. See vello for more information about limitations.

Examples

Cross platform (Winit)

cargo run -p with_winit

You can also load an entire folder or individual files.

cargo run -p with_winit -- examples/assets

Web platform

Because Vello relies heavily on compute shaders, we rely on the emerging WebGPU standard to run on the web. Until browser support becomes widespread, it will probably be necessary to use development browser versions (e.g. Chrome Canary) and explicitly enable WebGPU.

This uses cargo-run-wasm to build the example for web, and host a local server for it

# Make sure the Rust toolchain supports the wasm32 target
rustup target add wasm32-unknown-unknown

# The binary name must also be explicitly provided as it differs from the package name
cargo run_wasm -p with_winit --bin with_winit_bin

There is also a web demo available here on supporting web browsers.

[!WARNING] The web is not currently a primary target for Vello, and WebGPU implementations are incomplete, so you might run into issues running this example.

Minimum supported Rust Version (MSRV)

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

Future versions of Vello SVG 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 Velato'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 Velato development happens in the Linebender Zulip, specifically the #gpu stream. All public content can be read without logging in.

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

License

Licensed under either of

at your option

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

Contribution

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 dual licensed as above, without any additional terms or conditions.

Dependencies

~16–47MB
~793K SLoC