Skip to content

gpui-starter

Build desktop apps with Rust and GPUI. Themes, i18n, forms, and launcher out of the box.

gpui-starter is a Rust boilerplate for GPUI, the GPU-accelerated UI framework that powers the Zed editor. It ships with the things you would end up building anyway: multi-page navigation, 21 themes with hot-reload, i18n in English and Chinese, form validation, a Cmd+K command launcher, macOS system tray, SQLite persistence, secure storage via the OS keyring, auto-updater with Ed25519 signing, crash reporting, and accessibility through AccessKit.

You get a working app in cargo run, not a “hello world” label.

Terminal window
git clone https://github.com/hmziqrs/gpui-boilerplate.git gpui-app
cd gpui-app
cargo run

The app window opens with six pages: Home, Form, Settings, About, Diagnostics, and Notifications. Edit any page in src/ and save to see changes reflected on rebuild. See the getting started guide for prerequisites and project structure.

Multi-page sidebar navigation with type-safe route definitions. Each route maps to a render function, and the sidebar highlights the active page automatically. See routing for the route registry pattern.

21 built-in themes loaded from JSON files in themes/. Hot-reload watches the directory and applies changes without restarting. Catppuccin Mocha, Ayu Dark, One Dark, and 18 others ship by default. Read the themes guide for adding custom themes.

English and Chinese (zh-CN) translations managed by es-fluent. Translation files live in i18n/ and compile into typed constants, so a missing key is a compile error, not a runtime surprise. See i18n configuration for the setup.

Built on gpui-form and koruma. Define validation rules as Rust structs and get inline error messages, field-level dirty tracking, and submit handling. The forms documentation covers the full API.

Press Cmd+K to open a Spotlight-style search overlay. It fuzzy-matches across all registered actions and dispatches the selected one. You can register custom commands through the action registry. See the command launcher docs for registration and customization.

SQLite via rusqlite, embedded in-process. Migrations run on startup. The storage layer handles CRUD for settings, notification history, and app state. For sensitive data like tokens and credentials, the secure storage module uses the OS keyring (macOS Keychain, Linux Secret Service, Windows Credential Manager).

The updater checks a remote endpoint for new versions, verifies the manifest with Ed25519 signatures, and prompts the user to install. Crash reports capture panic backtraces and write them to a local directory for diagnostics. See the architecture overview for how both subsystems are wired.

Desktop notifications with inline history, dismiss/retry actions, and persistence across restarts. Covered in the notifications guide.

AccessKit provides screen reader support and semantic tree generation. The testing guide covers unit tests for views and integration patterns.

PageWhat it covers
Getting StartedPrerequisites, quick start, project structure
ArchitectureGPUI API patterns, entity management, globals, subscriptions
RoutingRoute registry, sidebar, active page tracking
ThemesBuilt-in themes, hot-reload, custom theme format
i18nes-fluent setup, adding languages, compile-time checks
FormsValidation rules, error display, submit handling
Command LauncherCmd+K overlay, fuzzy search, action registry
Secure StorageOS keyring integration, credential management
NotificationsDesktop notifications, history, persistence
TestingUnit and integration test patterns for GPUI views
PerformanceProfiling, render optimization, frame-time debugging