quickgui 0.1.1

A damage-driven, GPU-accelerated desktop GUI foundation
Documentation

QuickGUI

QuickGUI is a damage-driven, GPU-accelerated GUI framework for Rust desktop applications. It combines a GPUI-style fluent view API, Taffy Flexbox, CSS Grid and parent-size container queries, WGPU rendering, retained Unicode text, native accessibility, and bounded virtual scrolling.

The current focus is production-quality macOS behavior with low idle CPU and bounded memory. Windows and Linux compile through Winit/WGPU but still need native runtime and visual acceptance.

Performance model

  • Clean windows sleep in ControlFlow::Wait and render no idle frames.
  • Ordinary wheel scrolling and redraw requests coalesce at the event-loop boundary; opt-in element listeners preserve each native delta kind and gesture phase.
  • Hover, scrolling, drag previews, and selection reuse retained layout where possible.
  • Web-style hover, active, focus, validation, and drag transitions repaint retained geometry without rebuilding the view or rerunning layout.
  • Element opacity multiplies through complete GPU/native subtrees, remains hit-testable at zero, and changes rich-text glyph alpha without invalidating shaping.
  • Uniform and measured variable-height lists mount only visible rows and preserve logical anchors.
  • Layout-isolated container queries redeclare only when their assigned parent size changes.
  • Text, images, SVGs, paths, shaders, and GPU buffers use explicit retention bounds.
  • Font families, OpenType features, and ordered application fallbacks inherit through ordinary and rich text while remaining part of canonical retained shaping keys.
  • Compatible windows share the expensive WGPU instance, adapter, device, and queue.
  • Native services, delayed UI, animation, and background completion wake only on events or exact deadlines.
  • Native cursor declarations reuse retained hit testing and add no redraw or idle scheduling source.
  • Raw touch contacts are captured per identity with a fixed per-window bound and no recognizer, monitor, polling task, or idle scheduling source.

View API

Views are ordinary Rust with JSX-like composition and Tailwind-style helpers:

use quickgui::{
    Application, Color, EventContext, IntoElement, View, ViewContext, WindowOptions, div, text,
};

struct Counter {
    count: usize,
}

impl View for Counter {
    fn render(&mut self, cx: &mut ViewContext<'_, Self>) -> impl IntoElement {
        let increment = cx.listener("increment", |this, cx: &mut EventContext| {
            this.count += 1;
            cx.invalidate();
        });

        div()
            .size_full()
            .flex_col()
            .items_center()
            .justify_center()
            .gap_3()
            .bg(Color::rgb8(18, 18, 20))
            .text_color(Color::rgb8(240, 241, 244))
            .child(text(format!("Count: {}", self.count)).text_2xl())
            .child(
                div()
                    .on_click(increment)
                    .px_4()
                    .py_2()
                    .rounded_lg()
                    .bg(Color::rgb8(45, 105, 180))
                    .opacity(0.9)
                    .hover(|style| {
                        style.bg(Color::rgb8(56, 122, 204)).opacity(1.0)
                    })
                    .child("Increment"),
            )
    }
}

fn main() -> Result<(), quickgui::AppError> {
    Application::new().run(|cx| {
        cx.open_window(
            WindowOptions::new("Counter").size(480.0, 320.0),
            Counter { count: 0 },
        );
    })
}

Documentation

Start at the documentation index.

Try it

For the experimental Solid 2 host:

bun install
cd examples/solid
bun run dev

The complete DeepSeek streaming example uses QuickGUI core Markdown:

cd examples/ai-chat-solid
bun run dev

The Solid alert-dialog example presents native alerts with optional window ownership:

cd examples/alert-dialog-solid
bun run dev

The separate file-dialog example uses native open and save panels with Electron-shaped results:

cd examples/file-dialog-solid
bun run dev

The Solid popover example compares the shared compound JSX API of a native SystemPopover and a retained in-window Popover:

cd examples/popover-solid
bun run dev

The core-first system API example covers app environment, rich clipboard, displays, desktop integrations, permissions, preferences, power, native menus, notifications, tray icons, shortcuts, window controls, and updater metadata:

cd examples/system-api-solid
bun run dev

This creates and runs the platform-native development host while loading app.tsx from disk (an .app bundle on macOS). Rust framework examples remain available directly through Cargo:

cargo run --release --example gesture_input
cargo run --release --example cursors
cargo run --release --example appearance
cargo run --release --example window_background
cargo run --release --example clipboard
cargo run --release --example assets
cargo run --release --example styled_text
cargo run --release --example selection_controls
cargo run --release --example tabs
cargo run --release --example popovers
cargo run --release --example system_popover
cargo run --release --example comboboxes
cargo run --release --example autocomplete
cargo run --release --example dialogs
cargo run --release --example data_collections
cargo run --release --example displays
cargo run --release --example animations
cargo run --features inspector --example inspector
cargo run --release --example stress_scroll
cargo run --example hacker_news

The stress example mounts only the visible slice of a 100,000-row list and includes live CPU/render telemetry. On macOS, scripts/macos-performance-gate.sh gates bidirectional scrolling and scripts/macos-acceptance-gate.sh gates native resize, wrapped and ellipsized text, embedded NSView lifecycle, context-menu interaction and a 128-cycle popover memory plateau, idle behavior, whole-process CPU, peak RSS, and process-owned graphics footprint against a real WindowServer. The scripted popovers are lifecycle evidence, not a human-visible visual recording. scripts/macos-display-acceptance-gate.sh separately opens hidden, non-key windows on every active display and requires exact first-render centering plus settled retained/AppKit screen identity, scale, native-frame origin, work-area agreement, and full native-frame containment. Its report marks unavailable mixed-scale hardware as skipped, never passed.

Validate

cargo test --all-targets --all-features --locked
cargo +1.90.0 check --all-targets --all-features --locked
cargo clippy --all-targets --all-features --locked -- -D warnings
cargo bench --bench virtual_list
cargo bench --bench animation
scripts/macos-performance-gate.sh
scripts/macos-acceptance-gate.sh
scripts/macos-display-acceptance-gate.sh
QUICKGUI_PACKAGE_TOOLCHAIN=1.90.0 scripts/package-release-gate.sh

License

MIT OR Apache-2.0.