Skip to content

Default to the git GPUI pair for fresh gpui (crates.io as fallback) - #2

Merged
hellno merged 2 commits into
mainfrom
hellno/gpui-git-pair
Jun 5, 2026
Merged

Default to the git GPUI pair for fresh gpui (crates.io as fallback)#2
hellno merged 2 commits into
mainfrom
hellno/gpui-git-pair

Conversation

@hellno

@hellno hellno commented Jun 5, 2026

Copy link
Copy Markdown
Owner

Why

Deck shipped on the pure-crates.io GPUI pair, which pins gpui to Zed's Oct-2025 published snapshot — ~8 months stale, no wgpu Linux renderer, none of the recent gpui work. gpui-component is developed against Zed's gpui HEAD, and no other distribution can feed it (gpui-ce is stale since Dec 2025 and version-incompatible; gpui-unofficial is a different crate name). So the matched git pair is the only way to run fresh gpui with the component kit — this PR makes it the default and keeps crates.io as a documented fallback.

It also corrects a load-bearing error in the old docs: crates.io gpui is Zed's own official crate (owners: Brunsfeld/Maki/zed-industries), not a "longbridge fork."

What changed

Dependencies (Cargo.toml + committed Cargo.lock = the reproducible pin)

  • gpui + gpui_platform from zed-industries/zed (gpui 86effff)
  • gpui-component + -assets from longbridge/gpui-component (dadfca9 → 0.5.2)
  • Renderer: Metal on macOS, wgpu on Linux (Zed dropped blade, PR #46758)

Toolchain — single source of truth

  • Pin rust-toolchain.toml1.95.0 (matches Zed; gpui HEAD uses std::hint::cold_path, stabilized in 1.95)
  • Removed the duplicate dtolnay/rust-toolchain@stable from CI so the version is declared once and CI inherits it (rustup auto-installs it + components on first cargo call)

Source port (Oct-2025 → mid-2026 API drift — the whole thing)

  • main.rs: Application::new()gpui_platform::application(); new Menu { disabled, .. } field
  • shell.rs: window.focus(&handle, cx) (gained a cx arg)
  • tray.rs: AsyncApp::update no longer returns Result (dropped let _ =)

Tooling & docs (forkable story)

  • just bump-gpui — monthly bump helper
  • new docs/UPGRADING.md — bump runbook, toolchain note, and the crates.io fallback swap
  • README / LEARNINGS — git pair = default, lineage corrected, blade → wgpu

Reproducibility / forks

The committed Cargo.lock pins exact upstream commits — every fork and CI builds identical bytes. Bump on a cadence with just bump-gpui (≈monthly); if an unstable-feature error appears, match rust-toolchain.toml to Zed's. Full procedure in docs/UPGRADING.md.

Verification

  • cargo build (default + --features tray)
  • cargo clippy --all-targets -- -D warnings (default + tray)
  • cargo fmt --check
  • ✅ runtime smoke test — window opens, runs, no panic

Note for reviewers

First build/CI run clones Zed's repo and compiles gpui from source (slower once; Swatinem/rust-cache caches it). The large diff is mostly Cargo.lock churn from the registry→git source switch.

hellno added 2 commits June 5, 2026 16:43
…llback

Deck shipped on the pure-crates.io GPUI pair, which froze gpui at Zed's
Oct-2025 published snapshot (~8 months stale). gpui-component is developed
against Zed's gpui HEAD, so the matched git pair is the only way to run fresh
gpui with the component kit. Switch the default to it; keep crates.io as a
documented fallback.

Dependencies (Cargo.toml + committed Cargo.lock = the reproducible pin):
- gpui + gpui_platform from github.com/zed-industries/zed (gpui 86effff)
- gpui-component + -assets from github.com/longbridge/gpui-component (dadfca9 -> 0.5.2)
- Renderer now Metal on macOS, wgpu on Linux (Zed dropped blade, PR #46758)

Toolchain (single source of truth):
- Pin rust-toolchain.toml to 1.95.0 to match Zed; gpui HEAD uses
  std::hint::cold_path, stabilized in 1.95
- Remove the duplicate dtolnay/rust-toolchain@stable pin from CI so the
  toolchain is declared once and CI inherits it

Source port (Oct-2025 -> mid-2026 API drift):
- main.rs: Application::new() -> gpui_platform::application(); Menu.disabled field
- shell.rs: window.focus(&handle, cx)
- tray.rs: AsyncApp::update no longer returns Result (drop `let _ =`)

Tooling & docs:
- just bump-gpui helper for monthly bumps
- new docs/UPGRADING.md: bump runbook + toolchain note + crates.io fallback swap
- README/LEARNINGS: correct the lineage (crates.io gpui is Zed's official crate,
  not a "longbridge fork"); git pair = default; blade -> wgpu

Verified: cargo build (default + tray), clippy -D warnings (default + tray),
cargo fmt, and a runtime smoke test (window opens, no panic).
Brings in the ⌘K command palette (#1) and the LEARNINGS tightening (13a300d).

Conflict resolution:
- src/main.rs (View menu): keep the new "Command Palette…" item AND the
  git-gpui-required `Menu { disabled: false, .. }` field.
- docs/LEARNINGS.md §2: keep the corrected git-default dependency story
  (the incoming side reverted to the old "longbridge fork" text).

Ported the merged-in palette to the git gpui API:
- src/command_palette.rs: window.focus(&handle, cx) (gained a cx arg).
- README "Why this exists": "pure crates.io deps" -> "fresh git-pinned GPUI".

Re-verified on the merged tree: cargo build (default + tray),
clippy -D warnings (default + tray), cargo fmt, runtime smoke (no panic).
@hellno
hellno merged commit 6a86154 into main Jun 5, 2026
2 checks passed
@hellno
hellno deleted the hellno/gpui-git-pair branch June 11, 2026 11:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant