A WIP experimental visualization engine and renderer in Rust using wgpu
Rust
45
789 commits
updated Sep 23, 2026
Avenger is an early stage prototype of a new foundational rendering library and visualization primitives for information visualization (InfoVis) systems. Avenger defines a 2D scenegraph representation tailored to the needs of InfoVis systems, along with visualization primitives like scales and guides. And an event stream system for interactive visualizations inspired by Vega.
Avenger is written in Rust, and may be used directly from Rust.
For example, to launch a wgpu rendered visualization in a native window, run the following example:
cd examples/iris-pan-zoom
cargo run --release
Avenger may be compiled to WASM with rendering performed in WebGPU or WebGL2 (If WebGPU is not supported by the browser)
To build the example above to WASM, run the following:
cd examples/iris-pan-zoom
wasm-pack build --target web --release
Then open examples/iris-pan-zoom/index.html in a web browser.
The PngCanvas struct can be used to convert a scene graph to a PNG image headlessly. See the tests in
avenger-wgpu/tests/test_image_baselines.rs for usage.
Avenger's core is written in Rust and is composed of the following crates:
avenger-app: Application framework for building interactive Avenger-based visualizationsavenger-common: Shared types and utilities for the Avenger visualization systemavenger-eventstream: Interactive event handling system for Avenger visualizationsavenger-geometry: Geometry processing and spatial indexing for Avenger scene graphsavenger-guides: Visualization guide generation for Avenger (axes, legends, colorbars)avenger-image: Image loading and processing for the Avenger rendering systemavenger-scales: High-performance data visualization scales with mappings between data domains and visual rangesavenger-scenegraph: The core SceneGraph representation that is independent of rendering backendavenger-text: Text measurement and rasterization for the Avenger rendering systemavenger-vega-scenegraph: Logic to construct an Avenger SceneGraph from a Vega scenegraphavenger-vega-test-data: Crate that uses vl-convert to generate test data. For each baseline vega spec, avenger-vega-test-data will write out a vega scenegraph in JSON format along with a PNG rendering of the chart (which uses resvg). The tests in avenger-wgpu/tests/test_image_baselines.rs then input the scenegraph, render to PNG with avenger-wgpu, and compare the results to the baselines using structural similarityavenger-wgpu: Logic to render an Avenger SceneGraph using wgpuavenger-winit-wgpu: Native window application runner for interactive Avenger visualizationsThis is a hobby project with large ambitions. Where it goes will largely depend on whether other people get involved. But here are a few potential directions.
Do any of the ambitions above sound interesting? Are you interested in learning Rust? Please start a discussion and get involved.
Rust
98.7%
WGSL
1.1%
A WIP experimental visualization engine and renderer in Rust using wgpu
Rust
45
789 commits
updated Sep 23, 2026
Avenger is an early stage prototype of a new foundational rendering library and visualization primitives for information visualization (InfoVis) systems. Avenger defines a 2D scenegraph representation tailored to the needs of InfoVis systems, along with visualization primitives like scales and guides. And an event stream system for interactive visualizations inspired by Vega.
Avenger is written in Rust, and may be used directly from Rust.
For example, to launch a wgpu rendered visualization in a native window, run the following example:
cd examples/iris-pan-zoom
cargo run --release
Avenger may be compiled to WASM with rendering performed in WebGPU or WebGL2 (If WebGPU is not supported by the browser)
To build the example above to WASM, run the following:
cd examples/iris-pan-zoom
wasm-pack build --target web --release
Then open examples/iris-pan-zoom/index.html in a web browser.
The PngCanvas struct can be used to convert a scene graph to a PNG image headlessly. See the tests in
avenger-wgpu/tests/test_image_baselines.rs for usage.
Avenger's core is written in Rust and is composed of the following crates:
avenger-app: Application framework for building interactive Avenger-based visualizationsavenger-common: Shared types and utilities for the Avenger visualization systemavenger-eventstream: Interactive event handling system for Avenger visualizationsavenger-geometry: Geometry processing and spatial indexing for Avenger scene graphsavenger-guides: Visualization guide generation for Avenger (axes, legends, colorbars)avenger-image: Image loading and processing for the Avenger rendering systemavenger-scales: High-performance data visualization scales with mappings between data domains and visual rangesavenger-scenegraph: The core SceneGraph representation that is independent of rendering backendavenger-text: Text measurement and rasterization for the Avenger rendering systemavenger-vega-scenegraph: Logic to construct an Avenger SceneGraph from a Vega scenegraphavenger-vega-test-data: Crate that uses vl-convert to generate test data. For each baseline vega spec, avenger-vega-test-data will write out a vega scenegraph in JSON format along with a PNG rendering of the chart (which uses resvg). The tests in avenger-wgpu/tests/test_image_baselines.rs then input the scenegraph, render to PNG with avenger-wgpu, and compare the results to the baselines using structural similarityavenger-wgpu: Logic to render an Avenger SceneGraph using wgpuavenger-winit-wgpu: Native window application runner for interactive Avenger visualizationsThis is a hobby project with large ambitions. Where it goes will largely depend on whether other people get involved. But here are a few potential directions.
Do any of the ambitions above sound interesting? Are you interested in learning Rust? Please start a discussion and get involved.
Rust
98.7%
WGSL
1.1%