MoonBit 跨平台桌面 GUI 框架:一套代码直出 Windows / Linux / macOS 原生窗口,托盘/通知/快捷键/输入法/自启等系统能力开箱即用,moon add 后零配置
Dependencies
Formerly moonbit-libyue (renamed 2026-10). The mooncakes package is NoahLiu/native-gui and all existing import paths are unchanged.

moon add NoahLiu/native-guifn main {
let app = match @ui.mount_window(
[@ui.text("Hello, MoonBit!", font_size=18.0)],
title="Hello, MoonBit!",
width=400,
height=300,
) {
None => return // no window backend or no display service on this host
Some(a) => a
}
app.run()
}moon run examples/hello # a minimal window
moon run examples/hello-themed # the themed widget set
moon run examples/showcase # full demo board: components + system probes + extended charts, 15 pages
moon run examples/browser # embedded WebView browser (demo menu + status bar)| Import | Alias | Contents |
|---|---|---|
| NoahLiu/native-gui/base | @base | Platform-free primitives: Store / Signal / ListStore, focus stack, key codes, tick/prof |
| NoahLiu/native-gui/shell | @shell | System-capability shell: menus, global hotkeys, tray, notifications, reveal, the loop scheduler and read-only platform probes |
| NoahLiu/native-gui/widget | @widget | Self-drawn widget host: layout mapping, hit-testing, event routing, paint walk, declarative Node, overlays, drag & drop, input mapping, the App pump |
| .../native-gui/ui | @ui | Self-drawn widgets and the component library: forms, display, navigation, date, tables & virtual lists, entries, scroll, overlays, code view, declarative layer |
| .../native-gui/render | @render | Rasterizer — a pure-MoonBit software raster (path / fill / blend / gradient) plus a Cairo backend; bitmaps, canvas, images, PNG |
| .../native-gui/text | @text | Text layer: font families, fonts, attributed text and range attributes (Pango / DirectWrite) |
| .../native-gui/theme | @theme | Theme system: palette derivation + change subscription |
| .../native-gui/icons | @icons | Vector icon system (800+ icons) |
| .../native-gui/sys | @sys | OS capabilities facade |
| .../native-gui/input | @input | Editing core and key codes |
| .../native-gui/win | @win | Platform window backend (Win32 / GTK3 C stubs) |
| .../native-gui/dbus | @dbus | Linux D-Bus bridge (tray SNI, notifications, logind / upower, media, network…) |
| .../native-gui/chart | @chart | Charts plus the interactive layer |
| .../native-gui/mdview | @mdview | Markdown rendering view |
| .../native-gui/style | @style | Style layer: stylesheets as MoonBit values — Style rule blocks, hover / active / focus states, transitions |
| Module | Contents |
|---|---|
| NoahLiu/gui-media | Audio/video engine (ffmpeg decode + miniaudio output) and the player component |
| NoahLiu/gui-webview | Embedded WebView (WebKitGTK / WebView2), extracted from this module's web subpackage on 2026-10-16 |
| Windows | Linux | macOS | |
|---|---|---|---|
| Status | ✅ 10 / 11 | ✅ X11 mainline | 🟨 backend merged, on-device verification closing |
| Notes | GUI-subsystem exe: double-click opens no console window | Committed span deepin 20 ~ Ubuntu 26, staying on GTK3; Wayland sessions run, X11-dependent capabilities degrade per session | Cocoa / CoreText / ImageIO / WKWebView merged into master; on-device visual verification still closing, not yet part of the outward promise |
Install
Download zipMoonBit 跨平台桌面 GUI 框架:一套代码直出 Windows / Linux / macOS 原生窗口,托盘/通知/快捷键/输入法/自启等系统能力开箱即用,moon add 后零配置
Dependencies