See what runs.
The image viewer and each component demo run on this page from the hosted WebGPU build, with the demo's source beside it.
Component demos
Each demo is a .wisp component that vapors compiles, lays out
and draws on the GPU, in a native window and on a WebGPU canvas. The
sources below are copies of the files at the revision these pages
document. The build hosted on this site is made at the same revision;
it runs the demos here and the racer on the home page. Pick a demo with the
list or with ?demo=<name> in this page's address.
In a window: cargo run -p vapors-app --example demo -- <name>.
On the web: build with cargo xtask web, serve target/web and open it with ?demo=<name>.
hello
A dark panel with a heading, a paragraph and a blue bar, centred on a light page.
<style>:global(html), :global(body) { height: 100%; }:global(body) { margin: 0; display: flex; align-items: center; justify-content: center; background-color: #e9ecef;}.panel { max-width: 440px; margin: 16px; padding: 20px 24px; background-color: #171b1f; color: #e4e8ec; font-size: 15px;}h1 { margin-top: 0; margin-bottom: 8px; font-size: 20px; }.note { margin-top: 16px; height: 6px; background-color: #3a7bd5; }</style><div class="panel"> <h1>Hello from vapors</h1> <p>This panel is a .wisp component: its CSS cascades through vapors-css, Taffy lays it out, and vapors draws it on the GPU, natively and in this canvas.</p> <div class="note"></div></div> Image viewer
Launch the Wasm build. Scroll or pinch to zoom, drag to pan and use Open to select a photo. WebGPU is required.
Image viewer
Pan, zoom or load a photo.
Downloads the Rust/Wasm demo · WebGPU required