Where it came from: this library started as a MoonBit binding of Cheng Zhao (zcbenz)'s Yue / libyue, with layout following Yoga's flexbox. Neither is a runtime dependency any more — both stay as references for behaviour and as sources of material. Thanks also to MoonBit.
A cross-platform desktop GUI framework for MoonBit — one MoonBit codebase ships native windows on Windows 🟩 / Linux 🟩 / macOS 🟩, with tray, notifications, shortcuts, file dialogs and other desktop capabilities ready to use.
English | 简体中文
- Experience guide: run the five prebuilt demo apps, no code needed.
- App development: build desktop applications with MoonBit and native-gui.
- Build & run: working on the
native-guilibrary itself. - Package layout: the 15 package aliases and the two optional modules at a glance.
📚 Documentation: https://moonbit-native-gui.pages.dev/
🖥 Full system surfaces — tray, notifications, global shortcuts, clipboard, native menus, file dialogs, drag & drop, autostart and other desktop essentials work out of the box, plus system queries for volume / power / wallpaper / monitors / printers.
🎨 Consistent look, lightweight — no heavyweight graphics engine; the same widget appearance on all three platforms, with small artifacts and fast startup. Follows the system light/dark mode and accent colour by default, theme fully customizable; built-in control text is localizable (English and Chinese ship with the package).
📊 A complete widget set — layout primitives, form controls, interactive charts, Markdown rendering; separately, gui-media brings audio/video playback and display, and gui-webview brings web rendering on the system webview.
📝 Declarative UI and reactive state — the interface is described as a tree and mounted in one mount_window call; state lives in Store / Signal, and bound spots refresh with the data:
fn main {
let app = match @ui.mount_window(
[@ui.text("Hello, MoonBit!", font_size=18.0)],
title="Hello, MoonBit!",
width=400,
height=300,
) {
None => {
// no window backend or no display service on this host
return
}
Some(a) => a
}
app.run()
}
cd examples/showcase && moon run .— the demo board: basic components, interactive icons, system surfaces.
GUI capability in the MoonBit ecosystem has more than one lane: MoUI is built on the Skia rendering engine and targets interface logic shared across platforms, while native-gui renders through the system and aims at one-stop delivery for desktop apps — system capabilities out of the box, common widgets consistent across platforms, everyday applications finished in one place.
| Platform | Status | Notes |
|---|---|---|
| Ubuntu 24.04 | ✅ | XFCE / GNOME / KDE / Cinnamon |
| Deepin 23 / 25 | ✅ | |
| Deepin 20 | ❌ | waiting on MoonBit to fix the build for Deepin 20 — see Build & run |
| Windows 10 / 11 | ✅ | |
| macOS | ✅ | Apple Silicon |
Platform compatibility reports, widgets and documentation are all welcome. The basics:
- Commit gate: in
gui/,moon checkplusmoon test ui render text theme icons sys input win dbus chart mdview style base shell widgetmust be clean — zero errors, zero warnings - Write down what you learn: field-tested pitfalls and fixes are recorded with the code, not only in commit messages
- Small batches: one coherent change per commit, short commit messages
- Roadmap: what is done and what comes next is on the roadmap (Chinese)
- Full guide: CONTRIBUTING.md — layout rules, design stance, test split, commit and PR conventions
Build & run: environment from scratch, build commands and artefact paths, prebuilt binaries, failure → fix, plus the linking mechanism and how to add an example module.
native-gui is released under the MIT License. Third-party assets and their licenses are listed in THIRD-PARTY-NOTICES.md.
- MoonBit documentation
- Projects this library learned from: Yue / libyue · Yoga






