This repository is an independent native Windows Rust application built with GPUI. The existing Electron implementation is a behavior and persistence compatibility reference; do not modify or remove it from this repository.
Follow these references in order:
docs/SPEC.mdfor product behavior and acceptance criteria.- Current GPUI and GPUI Component APIs and examples.
- The Rust API Guidelines, rustfmt, and Clippy.
- The installed
rustskill sourced frompgdogdev/pgdog.
- Use Rust edition 2024 and the toolchain pinned in
rust-toolchain.toml. - Model invalid states with enums and newtypes where this improves correctness.
- Use
thiserrorfor typed errors throughout the application. Do not addanyhowunless an application boundary genuinely needs heterogeneous contextual errors. - Prefer safe Windows wrappers such as
win32job. The only handwrittenunsafeexception is the auditedwindow_visibilityboundary around Win32ShowWindow, because GPUI 0.2.2 does not expose single-window hide/show on Windows. Do not expand that exception. - Prefer borrowing over cloning, but do not introduce complicated lifetimes to avoid small UI-state clones.
- Avoid
unwrap. Useexpectonly for a documented invariant that cannot be represented in the type system. - Keep blocking filesystem and process work outside GPUI render methods.
- Keep GPUI entities on the foreground thread. Send plain owned events from worker threads.
- Keep modules focused and test domain logic independently from the UI.
Run these before considering a change complete:
cargo fmt --all -- --check
cargo clippy --all-targets --all-features -- -D warnings
cargo test --all-targets
cargo build --releaseUse scripts/cargo.ps1 when the installed Windows SDK is older than 10.0.26100 and GPUI cannot discover fxc.exe itself. Daily development uses incremental debug builds. Fat LTO and single-codegen-unit optimization are release-only.