Please check the build logs for more information.
See Builds for ideas on how to fix a failed build, or Metadata for how to configure docs.rs builds.
If you believe this is docs.rs' fault, open an issue.
XenGui: a reactive GUI library in pure Rust
Live web demo
XenGui (pronounced /ˈzɛn.ɡuː.aɪ/ | Zen-goo-eye) is a reactive rendering GUI implementation in pure Rust, built on the wgpu graphics API and winit window management. It combines a hooks-based reactive model with a Flexbox/Grid layout engine (powered by taffy) and a batched wgpu rendering pipeline, running natively on Windows, macOS, and Linux, as well as in the browser via WebAssembly.
[!IMPORTANT] XenGui is currently an early development release. APIs are still evolving and may change without notice between versions. Use with caution in production projects and expect breaking changes until a stable
1.0.0release.
Features
- Reactive state - React-style hooks (
use_state,component) drive re-renders without a virtual DOM diffing framework bolted on top. - Flexbox & Grid layout - Full CSS-like layout via
taffy, including flex direction, wrapping, alignment, gaps, and grid tracks. - GPU-accelerated rendering - Rects, text, and images are batched and drawn through dedicated
wgpupipelines. - Declarative styling - A CSS-like
Style/StyleBuilderAPI covering colors (including OKLCH), borders, typography, spacing, and more. - Built-in widgets -
View,Label,Button, andImage, each with hover/pressed/disabled style variants. - Interaction system - Unified handling of hover, click, focus, and keyboard events across widgets.
- Cross-platform - Native targets (Windows, macOS, Linux) and WebAssembly from a single codebase.
Example
new
.label
.font_size
.color
.background
.border
.padding
.on_click
.hover_style;
Installation
Cargo.toml
[]
= "0.2.2"
Sections
Quick Start
use *;
Run it with:
For WebAssembly targets, build and serve with Trunk:
Demo
Demo is available at: https://xengui.vercel.app
Documentation
Docs are available at: https://xengui.vercel.app/docs
License
Apache License 2.0 © 2026 randseas. See LICENSE for details.