Skip to content
Compile-time RSXZero Virtual DOMGPUI Kit 0.10.0

Write native GPUIdesktop views with RSX.

Structure desktop views with clean tags and utility classes while keeping state, loops, and type checking in idiomatic Rust. Static RSX expands directly into GPUI builder calls at compile time.

src/view.rs
rsx! {
<div class="flex flex-col gap-[12px] p-[24px]">
<h1 class="text-xl font-bold">{"Hello, GPUI"}</h1>
<p class="text-gray-500">{"Native Rust UI"}</p>
<Button("save") label="Save" primary />
</div>
}
Compiles straight to GPUI calls with full Rust type checking.Try in PlaygroundSyntax reference

Documentation Roadmap

Structured from first window to production architecture: master core syntax and styling first, then layer in theming, components, and tooling.

Native Desktop Showcase

Incident Console

A modular native GPUI application shipped in the repo—demonstrating multi-pane layouts, 100k-row uniform_list virtualization, rsx.toml tokens, and live timelines.

Native Incident Console application showing navigation, the incident queue, and the detail panel
Macro Family

Choose the Right Macro

Numeric spacing defaults to pixels (gap-4 = 4px). Opt into Tailwind’s 4px scale with rsx_tw! or globally via rsx.toml.

rsx!
Default permissive mode for gradual adoption and everyday views.
rsx_strict!
Rejects unknown static utility classes at compile time.
rsx_tw!
Enables Tailwind 4px spacing units (gap-4 → 16px).
rsx_fragment!
Returns Vec<AnyElement> for heterogeneous root nodes.
rsx_listener!
Wraps cx.listener with an optional notify shorthand.
rsx_expand!
Returns generated Rust code as a string for inspection.