0.1 · macOS, Windows, Linux · MIT

Native interfaces in Rust and Luau that do no work when nothing changes.

zgx is a retained-mode GUI framework in Rust for macOS, Windows and Linux. Components mount once and fine-grained signals update only the nodes that depend on them, so an idle window does no work and a busy one repaints only what changed. Interfaces are written in Rust or in Luau scripts that hot reload without losing state. It is young (0.1, used from git) and its API still changes.

main.rsRust
use zgx::compose::prelude::*;
use zgx_desktop::{Application, WindowOptions};

fn main() -> Result<(), Box<dyn std::error::Error>> {
    Application::new()
        .window(WindowOptions { title: "Hello".into(), ..Default::default() })
        .run(|cx| {
            let count = cx.ui.signal(0);
            let shown = count.clone();
            cx.render(
                row()
                    .p(24.)
                    .gap(12.)
                    .child(button().child(text("Add")).on_click(move || {
                        count.set(count.get() + 1);
                    }))
                    .child(text_signal(move || format!("Clicked {} times", shown.get()))),
            );
        })
}
hello/app.luauLuau · hot reloads, keeps state
local count = ui.state("count", 0)
return ui.row {
	p = 24,
	gap = 12,
	ui.button { on_click = ui.add(count, 1), "Add" },
	ui.text { "Clicked {count} times" },
}

zgx-run hello/ opens it. Save, and the window updates with the count kept.

Measured, not claimed

zgx uses the least CPU in 10 of 10 tests and the least GPU power in 9, against GPUI Fast, MyGo and Rune, and none of its frames run long.

CPU, heavy dashboard (both)
9.0%
GPUI Fast 43% lessMyGo 48% lessRune 59% less
GPU power, heavy dashboard (both)
154 mW
GPUI Fast 7% lessMyGo 32% lessRune 68% less
Long frames (over 25 ms)
0%
GPUI Fast, MyGo and Rune: up to 20.6%
CPU while idle
0.00%
GPUI Fast 0.37%MyGo 0.00%Rune 0.00%

One Apple M5 Max, macOS, 2026-10-25; zgx at c3c0dc9. Medians of fresh launches, lower is better.Every scene, every trial

Documentation

Five sets, each with its own sidebar. Every page is the repository's own docs, rebuilt as they change.

What it has

Built to be driven by agents

zgx inspect reads a running app's tree, states, errors and frame costs, and clicks, types and presses keys by the same targets its tests use. As an MCP server, any agent can use it.

Devtools
claude mcp add zgx -- zgx inspect mcp
zgx inspect tree --depth 2
zgx inspect click '"Send"'
zgx inspect frames 5