SUI
A flexible UI toolkit for Rust, powered by wgpu.
SUI takes its name from 水 (sui, water): the toolkit should take the shape of the application, not the other way around. Its retained widget tree and reactive state are tools, not rules. An application can use the complete stack, replace parts of it, or embed only the runtime. Custom code joins through a small widget contract, so SUI remains useful without owning the application's architecture.
SUI also handles several hard edges of modern application UI. Virtual collections keep identity and scroll position stable while data changes. The document model consumes streaming Markdown without throwing away finished layout. Typed application messages are routed independently of the paint tree, and managed overlays and responsive panes preserve focus as structure changes. The same semantics power accessibility, UI testing, and inspection.
Rendering follows the same idea: widgets emit renderer-neutral scenes, while
a retained wgpu compositor handles the normal GPU path. SUI is aimed at
technical and creative software where ordinary controls need to work naturally
beside custom graphics.
Explore the live SUI widget book →
Quick start
SUI requires Rust 1.90 or newer and the system libraries normally required by
winit and wgpu on the target platform.
[]
= { = "sinomo-ui", = "0.5" }
The package is named sinomo-ui because the sui registry namespace is
occupied. The dependency alias keeps application imports concise.
use *;
Run the checked quickstart or open the complete widget book:
The quickstart tutorial continues from this example.
Platform status
SUI is pre-1.0 software. The Rust API may continue to evolve during the 0.x
series.
| Surface | Status | Notes |
|---|---|---|
| Rust desktop | Available | Linux, macOS, and Windows through winit and wgpu |
| Embedded webviews | Optional | Native child views through sinomo-ui-webview and WRY; Linux uses X11 |
| Headless/testing | Available | Deterministic runtime, semantic interaction, rendering, and screenshots |
| Web | Alpha | Rust/Wasm and WebGPU; used by the live widget book |
| Android | Experimental | Native-activity host with lifecycle-aware surface management |
| Python | Alpha | pip install sinomo-ui; wheels for Windows, macOS, and Linux |
| JavaScript | Alpha | Working but incomplete Node/Electron binding, currently built from source |
The web path runs SUI applications through Rust/Wasm and WebGPU; it is not a DOM framework. Applications authored in JavaScript can use the separate Node/Electron API. See Platforms and Cargo features and the JavaScript binding guide for the current boundaries.
Documentation
- Start here
- API guide
- Node graph editor
- Embedded webviews
- Examples
- Testing
- Architecture
- Crate boundaries
Generate API documentation for the checked-out revision with:
Feature flags
The sinomo-ui facade enables desktop and wgpu by default. Disable default
features when embedding the renderer-neutral runtime or selecting another
platform host.
| Feature | Purpose |
|---|---|
desktop |
Desktop event loop and window integration; also enables wgpu |
web |
Browser/WebAssembly integration; also enables wgpu |
mobile |
Mobile integration, currently Android; also enables wgpu |
wgpu |
Renderer facade and external texture integration |
High-level test APIs live in sinomo-ui-testing.
Repository development
The widget book also serves as SUI's integration and visual-validation host. Generate its artifact bundle with:
Artifacts are written under target/ui-artifacts/sui-demo/widget-book.
Contributors should read CONTRIBUTING.md;
security issues should follow the security policy.
License
SUI is licensed under the MIT License.
The bundled sinomo-ui-lucide crate retains its upstream ISC license.