An independent MoonBit implementation of the GPUI programming model.
moon test examples/headless./script/build_and_run.shsh scripts/prepare_ubuntu.sh
moon run examples/ubuntu --target nativesh scripts/test_linux_text.shvp install --frozen-lockfile
vp devsh scripts/run_mcp_stdio.sh
sh scripts/test_mcp_stdio.shpub fn increment(
app : @core.App,
entity : @core.Entity[Int],
) -> Result[Unit, @diagnostics.FrameworkError] {
app.update(entity, context => {
match context.get() {
Err(error) => Err(error)
Ok(value) =>
match context.set(value + 1) {
Err(error) => Err(error)
Ok(_) => context.notify()
}
}
})
}| Package | What it provides |
|---|---|
| core/ | Application lifetime, entities, scoped contexts, subscriptions, scheduler and timers |
| primitives/ | Shared geometry, colors, input values, and portable primitives |
| text/ | UTF-16 documents, strict UTF-8 scalar-offset conversion, directional selections, and immutable composition values; no host IME or rendering |
| text_layout/ | Portable intrinsic text-measurement contract and copied layout/caret/hit values; depends only on text/ and primitives/ |
| platform/linux_text/ | Linux-only PangoFT2 implementation of copied measurement geometry and a private grayscale-mask raster boundary; native handles stay behind the FFI boundary |
| layout/ | Deterministic flex layout and recursive layout trees |
| element/ | Element trees, hit testing, event routing, focus, scroll state, drag gestures, and element-to-scene bridging |
| scene/ | Quad paint commands, bounded text snapshot items, validation, canonical snapshots, transforms, opacity, and clips |
| platform/ | Portable backend/window/event contracts plus the macOS backend |
| ubuntu/ | Ubuntu Wayland/EGL/GLES2 native backend |
| windows/ | Experimental Win32/D3D11 WARP backend slice |
| capability/ | Typed semantic capabilities, validation, schema projection, and registry |
| mcp/ | Optional modern MCP inventory, schema projection, stateless wire router, and in-process dispatch adapter |
| migration/host_services/ | Bounded portable service requests/completions and default-deny host-service policy |
| examples/ | Headless, macOS, Ubuntu, Windows, browser, and MCP stdio fixtures |
Install
Download zipAn independent MoonBit implementation of the GPUI programming model.