Desktop apps in Rust. Small, typed, no unsafe core.
One binary for macOS, Windows and Linux. Draw a native UI with an immediate-mode engine, or load a web frontend in the webview the OS already has and call Rust through typed IPC.
cargo run -p dashboard -- --native-ui
- 6.3MB
- Binary, stripped
- 60MB
- Memory, native UI
- 384MB
- Memory, webview included
- 0%
- CPU at idle
Measured on this project's Linux container under Xvfb, release build, with the dashboard example:
binary size after strip, PSS summed across the process tree, CPU sampled over ten seconds at rest.
The native UI process also maps about 25 MB of WebKitGTK libraries it never calls, because one binary
provides both window kinds. The webview figure includes the WebKitGTK web and network processes. macOS
and Windows use different webview engines and have not been measured.
use myrust_core::{ app::{App, WindowConfig, WindowContent}, ui::{button, column, text, NativeUi}, }; fn main() -> anyhow::Result<()> { let mut app = App::new("counter")?; let mut count = 0; let ui = NativeUi::new(move |c| { column(c).gap(12.0).children(|c| { text(c, &format("{count}")); if button(c, "Increment").clicked { count += 1; } }); }); app.on_ready(move |ctx| { ctx.create_window(WindowConfig { title: "Counter".into(), content: Some(WindowContent::NativeUi(ui.clone())), ..WindowConfig::default() })?; Ok(()) })?; app.run() }
No webview
The view is a Rust closure over your app's state. MyRust calls it to build each frame, resolves
layout on the CPU, and rasterizes the display list into the window through softbuffer.
No HTML, no JavaScript, no IPC hop.
Interaction is immediate-mode: button(c, "Increment").clicked is the click state for
this frame, not a callback registration.
Run it
$ cargo run -p dashboard -- --native-ui
System webview
A page in the webview the OS already ships — WKWebView on macOS, WebKitGTK on Linux, WebView2 on Windows. No bundled browser. Build the frontend with any stack.
Pages call registered Rust handlers and receive typed events. The TypeScript client is generated from your Rust signatures.
Bindings
export const greet: () => Promise<GreetResponse>; const res = await greet(); document.body.textContent = res.message;
-
Native UI, no webview
An immediate-mode engine written in Rust: flex layout, display lists, TTF glyph rasterization, hover, focus, Tab traversal, text fields, checkboxes, sliders and clipped scroll views.
-
Web frontends
Any web stack in the webview the OS already has: WKWebView, WebKitGTK, WebView2. No browser bundled, no second runtime to ship.
-
Typed IPC
Register Rust handlers, generate a TypeScript client from their signatures, and push typed events from Rust to the page.
-
Desktop APIs
Windows, menus, tray, notifications, clipboard, file dialogs, global shortcuts, drag and drop, window state, deep links, downloads and single-instance locking.
-
No unsafe in the core
myrust-coreis#![forbid(unsafe_code)]. The platform webview and windowing backends come from upstream crates; our code stays safe Rust. -
Ready to extend
A Cargo workspace with a core library, a CLI, and examples. Updater, packager and signing interfaces are wired; platform packaging tools are not invoked yet.
What is not done yet
This is an early framework. The list below is the honest boundary of what the current code does, matching the README:
- Native UI has no IME, text selection, clipboard, undo, or text shaping; the CPU presenter draws one system TTF with no kerning, bidi, or font fallback.
- Accessibility emits semantic nodes only — no AT-SPI, UIA, or NSAccessibility bridge is connected.
- Animation redraw is best-effort through
request_redraw; there is no timer-driven frame scheduler. - The wgpu backend renders to an offscreen texture and is compile-validated only; the window presents
through the CPU rasterizer and
softbuffer. - Window creation, rendering, mouse clicks, keyboard input and scrolling are verified under Xvfb on Linux. Real desktop sessions, macOS and Windows are untested.
- No code editor, rich text, Markdown, chart, or shader libraries — the engine stops at the UI primitives.