gpui-rhai
The Rust runtime for GPUI Rhai, a desktop
UI system where editable Rhai source produces a validated declarative UiNode
tree and GPUI performs native layout, rendering, input, and retained work.
[]
= "0.2"
For a complete application scaffold and editable first-party components:
cargo install gpui-rhai-cli --locked
cargo new my-app && cd my-app
gpui-rhai init --profile productivity
gpui-rhai add button input form_field
gpui-rhai check
What the runtime owns
- restricted Rhai compilation, lifecycle, typed state, stores, effects, and transactional reconciliation;
- a stable
UiNodeboundary instead of exposing GPUIWindow,Context,Div, orAnyElementto scripts; - native input/textarea, overlays, virtual collections, Canvas, motion, CodeViewer, DiffViewer, accessibility, themes and the token environment (density, size, corners), locales, the composition audit, and Host extensions;
- optional native composable charts with typed/streaming data, Geo2D, interaction, motion, Rust extensions, and SVG/PNG export;
FileScriptViewandEmbeddedScriptViewpreparation for standalone or embedded GPUI windows;- explicit resource budgets and no dependency on
gpui-component.
Components, layouts, themes, the token base, the typed component stylesheet,
locales, and small assets are source-owned by the application after
gpui-rhai-cli copies them from the version-matched gpui-rhai-registry
package. The runtime itself has no visual opinions; the official design system
is specified in docs/design.
Start with the User Guide. Further references cover embedding, component authoring, security, and the component catalog.