WeUI components, rendered natively in Rust.
weGPUI brings Tencent's WeUI 2.6.26 design language to GPUI, the GPU-accelerated framework behind Zed. It provides native controls, forms, navigation and overlays using GPUI primitives, with no embedded browser.
Explore the browser gallery · Run the native examples · Project status · Contribute
Developer preview · 0.1.0 · unreleased. The native gallery maps all 60 upstream routes and adds a Languages page. Visual, interaction and accessibility parity are still being qualified; no desktop platform has completed the full support criteria. See the acceptance matrix and remaining work.
| Native GPUI | Upstream WeUI |
|---|---|
![]() |
![]() |
Recorded macOS comparison. Visual evidence identifies each capture's source and review limits; these images are not a claim of current cross-platform parity.
- Controls and forms: buttons, cells, text inputs, text areas, choices, switches, sliders, search, validation, verification codes and date fields.
- Navigation and content: navigation bars, tab bars, grids, panels, articles, steps, footers and previews.
- Overlays and media: dialogs, half-screen dialogs, action sheets, pickers, toasts, image viewers and uploader interfaces.
- Themes: light and dark appearance, care contrast, custom brand colours and host palettes.
- Accessibility: roles and names, keyboard navigation, visible focus, modal isolation, focus restoration and reduced-motion handling, with bounded native and reader evidence.
- Localisation: English defaults, 14 message catalogs, custom catalogs and mirrored RTL layouts. Translation review and several bidirectional-text cases remain open.
The latest parity continuation adds Unicode line breaking, matching narrow-form/article samples and refreshed website evidence. Recorded comparisons identify their own source; capture completeness does not establish full parity.
The component modules document APIs, defaults, callbacks and known limits. Applications own state, network requests, persistence and upload transport.
Install Rust 1.95+ and your platform's GPUI build requirements. Linux additionally needs an X11 or Wayland desktop and GPUI's system libraries.
git clone https://github.com/codewhale-hq/weGPUI.git
cd weGPUI
cargo run --example minimal --locked
cargo run --example gallery --lockedMore examples:
cargo run --example application --locked
cargo run --example component_states --locked
cargo run --example gallery --locked -- --lang zh-Hans --theme dark --care
cargo doc --no-deps --openminimal demonstrates a cell, button and dialog. application combines validation, controlled
state, local image selection/preview/deletion, theme switching and modal confirmation.
component_states exercises loading, labels, countdowns and keyboard behavior.
The preview requires the matching compatibility copies in vendor/. Cargo patches are not
inherited from dependencies: configure all four at your application's workspace root.
With a sibling checkout named weGPUI, use:
[dependencies]
wegpui = { path = "../weGPUI" }
gpui = { package = "gpui-pre", version = "=0.3.9" }
gpui_platform = { package = "gpui-pre-platform", version = "=0.3.9", features = ["font-kit", "wayland", "x11"] }
[patch.crates-io]
gpui-pre = { path = "../weGPUI/vendor/gpui_pre" }
gpui-pre-linux = { path = "../weGPUI/vendor/gpui_pre_linux" }
accesskit_unix = { path = "../weGPUI/vendor/accesskit_unix" }
accesskit_atspi_common = { path = "../weGPUI/vendor/accesskit_atspi_common" }The desktop platform dependency includes Linux windowing features; font-kit alone cannot
open a Linux window. Keep the exact GPUI pins and vendor source together. Provenance and the
scope of each compatibility change are documented in vendor/README.md.
Register wegpui::Assets and call wegpui::init(cx) before opening windows. Wrap application
roots in accessibility::ModalScope for modal isolation. The complete, compiled starting point
is examples/minimal.rs; its platform helper and keyboard wiring are
included in the repository.
For a self-contained source setup with the patches already configured, create a reproducible preview bundle:
python3 -I scripts/package_preview.py --out target/previewThe bundle includes a separate consumer, integrity manifests, licences and the patched source graph. It is a developer source distribution, not a signed installer or a published crate.
Built-in control labels and messages use the active I18n catalog. English is the default;
applications can switch languages at runtime or supply a custom Messages catalog.
Text passed to component builders remains application-owned.
wegpui::I18n::set_locale(wegpui::Locale::parse("ar").unwrap(), cx);The 14 catalogs cover English, Simplified and Traditional Chinese, Japanese, Korean, Spanish, French, German, Portuguese, Russian, Hindi, Thai, Arabic and Hebrew. Twelve are starter translations awaiting native-speaker review. RTL layouts, wrapped input caret/selection and multiline alignment are implemented, with sampled macOS and Linux evidence. Shared Unicode bidi geometry, styled RTL colors/underlines, locale-ordered Gregorian date entry/pickers and host-local today are implemented. Full IME, reader and platform qualification remains open. See the code and parity receipt and localisation guide.
The first release targets macOS, Windows and Linux. Build results, native runtime samples and complete platform support are separate milestones.
| Platform | Available evidence | Remaining qualification |
|---|---|---|
| Linux | Current source gates, X11 comparisons, native interaction and Orca samples; historical nested-Wayland checks | Complete reader/IME/state coverage, hardware and distribution |
| macOS | Current build/tests/Clippy/docs and sampled RTL native input/AX checks; historical comparisons | Complete state/input/reader coverage and signed distribution |
| Windows | Current ARM64/MSVC build/tests/Clippy/docs and standalone consumer; historical native interactions | Current visible UI needs VM sign-in; x64, reader and distribution |
| iOS | Experimental backend and bundle scaffold | Upstream application API incompatibilities; no runtime acceptance |
| Android | Library type-checks | Backend selection and native runtime |
Platform evidence defines the support criteria. Release readiness tracks packaging, signing and maintainer decisions.
The published gallery runs upstream WeUI examples in HTML/CSS/JavaScript. It offers 60 routes, 132 scene presets, light/dark/care/brand controls and local file previews. Native Rust is a separate implementation.
To preview the website locally:
python3 website/build.py
python3 -m http.server 4173 --bind 127.0.0.1 --directory website/distSource pushes do not deploy the website. Website documentation covers builds, checks and the manual GitHub Pages publishing workflow.
Run the five source gates after filling the dependency cache with cargo fetch --locked:
cargo fmt --all -- --check
cargo build --all-targets --locked --offline
cargo test --locked --offline
cargo clippy --all-targets --locked --offline -- -D warnings
RUSTDOCFLAGS='-D warnings -W missing-docs' cargo doc --no-deps --locked --offlineThe parity plan pins upstream source and tracks 132 scenes across eight appearances. Capture tooling records source and image hashes; capture completeness and pixel scores do not establish parity. Component behavior, actual reader output and platform acceptance each require their own evidence.
- Publication review and status/known limitations
- Component acceptance and visual review
- Upstream coverage and source attribution
- Contributing, security reporting and code of conduct
- Changelog
GitHub is the canonical home for source, issues and pull requests. CNB is a read-only mirror.
Original weGPUI code is MIT OR Apache-2.0. See LICENSE-MIT and LICENSE-APACHE.
WeUI design, example content and icons are Copyright Tencent, Inc., under the MIT licence. The distribution also identifies THL A29 Limited, a Tencent company. Their notices are preserved in LICENSE-WEUI and NOTICE.
The text input adapts GPUI's input example, Copyright Zed Industries, Apache-2.0; its attribution is preserved in the source and NOTICE. This is an independent project.

