GUI FRAMEWORK / RUST

HTML, SVG and 3D.
Components in Rust.

Build GPU-rendered interfaces with Rust, component templates and scoped CSS. Vapors targets desktop, Android, iOS and WebAssembly apps, with reactive state and Svelte-inspired single-file components.

Desktop and browser demos run today. Native mobile apps and a shared HTML, SVG and 3D scene are coming soon. See the composition approach.

iOS and Android apps — coming soon →

OPEN SOURCEMITEARLY DEVELOPMENT
01 Rust components02 Scoped CSS03 Reactive state04 Desktop · Wasm

Drive the circuit.

A top-down racer written in Rust. Its 3D world is drawn by the vapors scene renderer, under compiled vapors components for its HUD and tuning controls.

VAPORS / CIRCUITOpen full size ↗
Top-down circuit with a small orange race car

Three laps. Your time.

Drive a small circuit with the keyboard or touch controls. The camera widens as you accelerate.

Downloads the Rust/Wasm demo · WebGPU required
WASD / arrows to drive · Space pauses · Touch controls included
COMPONENT MODEL

Rust, CSS and a template.

A .wisp file holds Rust, CSS and an HTML template. The compiler generates readable Rust.

counter.wisp
<script>let count: Signal<i32> = Signal::new(0);let increment = move || count.update(|n| *n += 1);</script><style>:global(body) { display: flex; flex-direction: column; align-items: flex-start; gap: 12px; padding: 16px; }button { padding: 8px 12px; }</style><button onclick={increment}>Clicked {count} times</button>
vapors component source
01

State in Rust

A signal is a piece of reactive state that tracks its dependants and notifies them when its value changes. Event handlers update signals with ordinary Rust closures.

02

Style with CSS

Each component's style applies only to its own elements. Selectors, the cascade and computed values come from the vapors Rust CSS engine.

03

Updates follow state

Expressions track their signals. A changed value patches the corresponding part of the tree.

Read the component guide →

vapors lays out compiled components and draws them in a native window and on a WebGPU canvas. The framework's demos run here in the browser, with source beside each example.

STARTING POINTS

For Svelte and Rust developers.

Read an introduction for your background, then follow the component course.

PERFORMANCE

Reuse layout, styles and drawing data.

Templates compile into Rust. The runtime retains layout and drawing data so unaffected results can be reused after a change. An unchanged interface needs no continuous redraw loop. The performance page explains the work avoided, the work that remains, and how it is checked.

BUILD Templates compile to Rust UPDATE Reuse unaffected results IDLE Redraw when needed EFFICIENCY Size, memory and frame time
RESOURCES

Learn the component model.

Examples, the component course and planned work.

PROJECT STATUS

In early development.

Vapors' APIs and capabilities are still changing. Explore the current architecture and supported features.

How it fits together →