tree: dff732aa85afde73bc6b72efd4602f49e8503597
  1. examples/
  2. src/
  3. Cargo.toml
  4. CHANGELOG.md
  5. LICENSE-APACHE
  6. LICENSE-MIT
  7. README.md
sparse_strips/vello_hybrid/README.md

Vello Hybrid

Hybrid CPU/GPU renderer

Apache 2.0 or MIT license.
Linebender Zulip chat. GitHub Actions CI status.

A hybrid CPU/GPU renderer for 2D vector graphics.

This crate provides a rendering API that combines CPU and GPU operations for efficient vector graphics processing. The hybrid approach balances flexibility and performance by:

  • Using the CPU for path processing and initial geometry setup
  • Leveraging the GPU for fast rendering and compositing
  • Minimizing data transfer between CPU and GPU

Key Features

  • Efficient path rendering with CPU-side processing
  • GPU-accelerated compositing and blending
  • Support for both windowed and headless rendering

Feature Flags

  • wgpu (enabled by default): Enables the GPU rendering backend via wgpu and includes the required sparse shaders.
  • wgpu_default (enabled by default): Enables wgpu with its default hardware backends (such as Vulkan, Metal, and DX12).
  • text (enabled by default): Enables glyph rendering ([Scene::glyph_run]).
  • webgl: Enables the WebGL rendering backend for browser support, using GLSL shaders for compatibility.

If you need to customize the set of enabled wgpu features, disable this crate‘s default features then enable its wgpu feature. You can then depend on wgpu directly, setting the specific features you require. Don’t forget to also disable wgpu's default features.

Architecture

The renderer is split into several key components:

  • Scene: Manages the render context and path processing on the CPU
  • Renderer or WebGlRenderer: Handles GPU resource management and executes draw operations
  • Scheduler: Manages and schedules draw operations on the renderer.

See the individual module documentation for more details on usage and implementation.

Minimum supported Rust Version (MSRV)

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

Future versions of Vello Hybrid 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.

As time has passed, some of Vello Hybrid‘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 Hybrid 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.

License

Licensed under either of

at your option.