xgpui-ext-lab
Version 0.2.0 · Unpublished development package
xgpui-ext-lab is the shared home for XGPUI's native extension labs,
benchmarks and browser demos. It contains runnable examples for exploring
rendering behavior and comparing implementations. The workloads share one Cargo
manifest and lockfile, with separate executable targets.
It lives at apps/xgpui-ext-lab/. The reusable extension libraries live separately
under extensions/crates/ and do not depend on this package.
What is in it?
| Workload | Target | Root recipe |
|---|---|---|
| Image loading, mipmaps, adjustments, tiled canvases and paths | media-lab | just lab-media |
| Brushes, gradients, meshes and layer effects | paint-lab | just lab-paint |
| Native wide-gamut presentation | gamut-lab | just lab-gamut |
| Color conversions and gradient comparisons | color-lab | just lab-color |
| Native and Parley text comparisons | text-lab | just lab-text |
| SVG rendering, scaling and scheduling | svg-lab | just lab-svg |
| Spatial cards and native Mandelbrot explorer | canvas-lab | just lab-canvas |
| Dense Metal producer regression (macOS) | metal-producer-regression | See below |
| Quad rendering benchmark | quad-bench | just lab-quad-bench |
| Color-field rendering benchmark | color-field-bench | just lab-color-field-bench |
| Native and browser shader examples | shader-examples | just lab-shader |
| Browser extension gallery | extensions-web | just pages-demos |
The package also keeps the associated sample assets, fixtures, benchmark scripts and recorded reports beside the workloads that use them. Measurements describe the recorded workload and machine; use the benchmark commands to measure your own setup.
Why is it not published?
The manifest sets publish = false. This is a development and validation package,
not a library that applications need to depend on. It follows the local framework
and extension checkouts, uses repository fixtures, and can change as experiments
and diagnostic workloads evolve.
Keeping it unpublished lets the extension libraries have their own release contracts without committing to stable lab commands, benchmark output formats or sample layouts. Normal applications use the framework and extension libraries; they do not pull in the labs or their development dependencies.
This does not prevent a future release on crates.io. Before publishing, we would choose the supported tools, package the required assets, verify registry-only dependencies and define the compatibility expectations for the commands and outputs. The lab is deliberately absent from the library release map today.
Build and test
Run from the repository root:
just lab-build
just lab-test
lab-build builds the native lab and benchmark executables in release mode without
opening a window. lab-test runs unit and compatibility tests. Tests that create
real platform windows remain opt-in through the native-window-tests feature.
Choose one workload with its root recipe, or select its binary directly:
cargo run --release --locked --config .cargo/validation.toml --manifest-path apps/xgpui-ext-lab/Cargo.toml --bin paint-lab --target-dir target
For a bounded benchmark without a window:
just lab-quad-bench --headless --cpu-only
See Local Development for toolchains, native platform requirements and the distinction between framework builds and lab builds.
Native lab launch commands
These applications run on your desktop, not inside the browser. Run the commands from the repository root after following the platform setup in Local Development.
Canvas and Mandelbrot
Explore spatial cards, or open the native fractal explorer:
just lab-canvas
just lab-canvas --mandelbrot
The native Mandelbrot explorer retains complete frames during navigation, with Metal compute for shallow views on supported macOS wide-SDR hosts and CPU refinement for deep views. See the canvas guide.
Metal producer regression (macOS)
Run the supervised control and dense 512-producer workload, including replay, scene replacement and pixel checks:
cargo run --release --locked --config .cargo/validation.toml --manifest-path apps/xgpui-ext-lab/Cargo.toml --bin metal-producer-regression --target-dir target
Each child has a 15-second runtime limit after compilation. A timeout fails the check; preparation markers help locate a stall.
GPU interop
Run wgpu's boids example as an independent engine in an xgpui window, through xgpui-gpu-interop:
cargo run --release --locked --config .cargo/validation.toml --manifest-path apps/xgpui-ext-lab/Cargo.toml --bin interop-boids --target-dir target
gpu-canvas-workbench is an editable compute canvas with automated checks
(--check), and gpu-interop-lab stress-tests surfaces. All three
accept --run-seconds N.
Pastel waves
The animated ribbon experiment has moved to the xgpui-luma lab.
Full paint lab
Open the desktop brush, gradient, mesh and layer-effect comparisons:
just lab-paint
Native wide gamut
Compare native wide-SDR presentation with ordinary sRGB controls on a supported display:
just lab-gamut
Native text comparison
Compare native and Parley shaping, editing and virtualized paragraphs. Each supported comparison window includes live weight, width, slant and optical-size sliders, keyboard controls, presets, wrapping specimens and measured advances:
just text --backend both
just lab-test live_axis -- --nocapture
The native/Parley font-controls labs and tests are verified on macOS and Windows. Tests run with backtraces. The same sliders also run in the Wasm font inspector with Parley on WebGPU/WebGL2. See font controls for support, preview admission limits and core 3.0 migration.
Desktop SVG lab
Open the native SVG rendering, zoom and scheduling comparisons:
just lab-svg
Browser demos and local docs
The browser demos are targets of the same package. Their scripts select the
web feature without the default native targets and generate the JavaScript and
WASM bundles used by this website:
just pages-demos
just pages-check
just pages-serve
pages-demos requires the pinned wasm-bindgen CLI, currently 0.2.129, and the
wasm32-unknown-unknown Rust target. It writes the bundles into pages/examples/extensions/
and pages/examples/shaders/, which just pages-serve serves at the same
examples/ URLs as the website. Reload the page after rebuilding.
Open the browser demo gallery or open the shader examples. Their hosted URLs are unchanged by the package consolidation. The gallery also lists native-only workloads and how to launch them locally.
How is this different from xgpui-lab?
xgpui-lab is the separate desktop
application used to exercise XGPUI together with the Luma SDK. It has its own
repository and application shell.
xgpui-ext-lab is the development package inside this repository: focused native
labs, repeatable benchmarks and the source for this website's WASM demos. The two
names refer to different applications and development roles.
Color tasks and the native color lab
The browser gallery includes chromaticity and pixels + metadata demos. Both are sRGB previews of Rust/Wasm calculations. The native chromaticity workspace now lives in this package's color-lab, alongside the original swatches. Use just lab-color --chromaticity or switch tabs in just lab-color; see color labs for commands, controls and the limits of CPU values, GPU readback and display capability reports.