From components to pixels.
Vapors compiles templates into Rust. Its runtime owns the UI tree, applies CSS, lays out elements and draws them on the GPU.
.wisp components
Generated Rust
Style, layout and drawing data
GPU rendering
Components and updates
A component contains Rust, a template and scoped CSS. Signals hold reactive state and notify their dependants of changes. Generated code updates the affected parts of the UI tree; style and layout changes can also affect related elements.
The runtime retains layout and drawing data between updates. It requests another frame when needed, including for application activity such as animation. Performance explains reuse, remaining costs and validation.
Rendering
Vapors uses its own Rust CSS engine, Taffy for block, flex and grid layout, Parley for text, and wgpu for rendering. Browser builds run as WebAssembly on a WebGPU canvas; interface elements are not browser DOM elements. Existing web pages cannot be used unchanged.
Supported elements and events · Scoped CSS · HTML, SVG and 3D composition
Desktop, Android, iOS and WebAssembly
All four are primary delivery targets. Desktop and browser demos run today. WebAssembly supports browser applications as well as convenient testing and iteration.
Native mobile apps are coming soon. A full Vapors application will run inside a Swift or Kotlin host, with shared platform services, capability checks and access to native functions. Embedding a Vapors view in an existing application will also be possible.
Coming soon
- Native iOS and Android hosting and platform services.
- Shared HTML, SVG and 3D scene composition.
- More HTML elements, CSS properties and screen-reader integration; the reference records the current limits.
- Browser editing and compilation, so components can be changed and run without a local toolchain. The current demos run precompiled Wasm.