Skip to content

Repository files navigation

Moonbot

MoonUI

Moonbot's standalone GPUI runtime and Moon component library for Rust desktop apps
Windows · macOS · Linux · Web

Guardrails License: Apache-2.0 Platforms Built with Rust Built on GPUI 70+ components

Features · Screenshots · Layout · Usage · Build · Docs · License

MoonUI is a standalone GPUI runtime and component workspace: a self-contained extraction of Zed's GPUI, plus a Moon-themed port of Longbridge's gpui-component. It is the UI toolkit behind MoonTerminal and can be consumed by any Rust desktop app straight from Cargo — no external gpui dependency required.

MoonUI component gallery — Controls

Features

  • Standalone GPUI runtime — GPUI is extracted from Zed and vendored here (moon-gpui), so applications depend on this workspace directly instead of tracking upstream gpui.
  • Multi-platform backends — a single moon-gpui-platform selector drives the Windows, macOS, Linux (X11 + Wayland), web, and headless backends.
  • 70+ themed components — buttons, inputs, tables, menus, overlays, accordions, tooltips, and more, ported from Longbridge gpui-component behind a Moon-facing API (moon-ui).
  • Moon theme & palette — a light/dark design-token system (MoonTheme / MoonPalette); see PALETTE_SPEC.md.
  • Embedded assets — icons ship bundled in the binary via RustEmbed, so a distributed build carries its own glyphs.
  • Component gallery + visual guardrails — a live gallery (moon-ui-gallery) with snapshot-based visual-regression tests, gated in CI.
  • Apache-2.0, preserving upstream Zed and Longbridge licensing.

Screenshots

From the component gallery (cargo run -p moon-ui-gallery), Moon dark theme:

Inputs Data
Inputs — fields, selectors, steppers Data — tables, columns, sorting
Overlays Layout
Overlays — dialogs, popovers, menus, notifications Layout — docks, panels, resizables

Repository Layout

Crate Role
moon-gpui The GPUI facade applications depend on.
moon-gpui-platform Selects the Windows, macOS, Linux, web, and headless backends.
moon-gpui-windows · -macos · -linux · -web Per-platform GPUI backends.
moon-ui The public Moon UI facade for application code.
moon-ui-components The Moon-maintained component port (its Rust crate name stays gpui_component to keep port diffs readable).
moon-ui-components-assets The embedded (RustEmbed) icon/asset set.
moon-ui-gallery The component showcase and snapshot tests.

The GPUI runtime is supported by a set of Zed-extracted crates (moon-collections, moon-scheduler, moon-sum-tree, moon-refineable, moon-media, moon-http-client, …) that applications never depend on directly.

Use From Cargo

Applications depend on the public Git repository:

gpui = { package = "moon-gpui", git = "https://github.com/Moonbot-Tech/MoonUI", branch = "master" }
gpui_platform = { package = "moon-gpui-platform", git = "https://github.com/Moonbot-Tech/MoonUI", branch = "master", features = ["font-kit", "wayland", "x11"] }
moon-ui = { package = "moon-ui", git = "https://github.com/Moonbot-Tech/MoonUI", branch = "master" }

For local development, keep the public Cargo.toml unchanged and add a private path override in the consuming application's .cargo/config.toml (do not commit it):

[patch."https://github.com/Moonbot-Tech/MoonUI"]
moon-gpui = { path = "../MoonUI/crates/moon-gpui" }
moon-gpui-platform = { path = "../MoonUI/crates/moon-gpui-platform" }
moon-ui = { path = "../MoonUI/crates/moon-ui" }

Prefer [patch] over top-level paths: it replaces the same Git source without changing the shape of the dependency graph.

Build

Windows (MSVC):

cmd.exe /d /s /c 'call "C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\VC\Auxiliary\Build\vcvars64.bat" >nul && cargo check -p moon-gpui --target x86_64-pc-windows-msvc'
cmd.exe /d /s /c 'call "C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\VC\Auxiliary\Build\vcvars64.bat" >nul && cargo check -p moon-ui --target x86_64-pc-windows-msvc'

macOS requires the full Xcode Metal toolchain. Linux requires the GPUI Linux backend dependencies used by Zed.

Run the component gallery to browse everything MoonUI ships:

cargo run -p moon-ui-gallery

Documentation

Doc What's inside
Palette spec The Moon color/token system.
Visual guardrails The snapshot/visual-regression rules enforced in CI.
Component audit Coverage and status of the ported components.
Patch queue The maintainer workflow for re-syncing the GPUI extraction from upstream Zed.

License

MoonUI preserves upstream licensing from the projects it is built from.

  • GPUI-derived crates are based on Zed and carry their original Zed license metadata. See the root LICENSE and crate-level LICENSE-APACHE files.
  • Zed's GPL zlog / ztracing helper crates are intentionally not extracted. The remaining extracted GPUI crates are Apache-2.0.
  • Moon UI component crates are an Apache-2.0 port of Longbridge gpui-component. The component crate keeps its upstream copyright notice in crates/moon-ui-components/LICENSE-APACHE.
  • Moonbot-specific additions are distributed under Apache-2.0 unless a file or crate manifest says otherwise.

Moonbot · the GPUI runtime & UI toolkit behind MoonTerminal · moonbot.pro

About

MoonTerminal UI

Resources

Contributing

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages