gpui-rhai 0.1.8

A Rhai-authored declarative UI runtime for GPUI
Documentation

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.

[dependencies]
gpui-rhai = "0.1"

For a complete application scaffold and editable first-party components:

cargo install gpui-rhai-cli --locked
gpui-rhai init
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 UiNode boundary instead of exposing GPUI Window, Context, Div, or AnyElement to scripts;
  • native input/textarea, overlays, virtual collections, Canvas, Motion Runtime 2, CodeViewer, DiffViewer, accessibility, themes, locales, and Host extensions;
  • optional native composable charts with typed/streaming data, Geo2D, interaction, motion, Rust extensions, and SVG/PNG export;
  • FileScriptView and EmbeddedScriptView preparation for standalone or embedded GPUI windows;
  • explicit resource budgets and no dependency on gpui-component.

Components, themes, 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.

Start with the User Guide. Further references cover embedding, component authoring, security, and the component catalog.