Development setup
To run the shell, you need a Wayland session on Hyprland, Niri or Mango. Building works anywhere.
With Nix (recommended)
Section titled “With Nix (recommended)”git clone https://github.com/andre-brandao/gpui-shellcd gpui-shellnix develop # or `direnv allow`cargo runThe dev shell provides the same toolchain (nightly, from
rust-toolchain.toml) and system libraries that CI uses.
Without Nix
Section titled “Without Nix”Install a nightly Rust toolchain via rustup (rust-toolchain.toml selects it
automatically), plus the development headers for:
wayland, libxkbcommon, vulkan-loader, fontconfig, freetype,
openssl, libpulseaudio, pipewire, systemd (libudev), libxcb, and
clang (for bindgen).
nix/shell.nix
has the authoritative list.
Useful commands
Section titled “Useful commands”cargo run # run the shellcargo run -- --input ";s" # open the launcher on a view (here: services)RUST_LOG=debug cargo run # verbose loggingcargo run -p story # component gallerycargo run -- --validate # check config.toml / theme.toml and exitscripts/flamegraph.sh --launch # CPU profilescripts/heaptrack.sh # heap profileA running shell owns the IPC socket, so a second cargo run only toggles
the launcher of the first one. Stop your installed shell before running a
dev build.
Checks
Section titled “Checks”CI runs these on every pull request:
cargo fmt --all --checkcargo clippy --workspace --all-targets -- -D warningscargo test --workspacenix buildConventions
Section titled “Conventions”- Timers: use
cx.background_executor().timer(duration).awaitinside GPUI tasks, nevertokio::time::sleep. - Theme: read colors and sizes from
cx.theme(). Usepx()for spacing andtheme.font_sizes.*for text. - Icons: add an SVG to
crates/assets/icons/(from Lucide). The asset bundle rebuilds automatically. - Logging: use
tracingmacros (debug!,warn!, …), notprintln!. - Config: the shell never writes
config.toml. Anything it persists goes tostate.toml. - UI layering: primitives go in
ui::components, composite shell chrome inui::patterns. State, keybindings and config stay inapp. Every component or pattern gets a story incrates/story.
The docs site
Section titled “The docs site”This site lives in docs/ (Astro + Starlight):
cd docsbun installbun run devIt deploys to GitHub Pages on every push to main that touches docs/.