Skip to content

Windows support — Phase 2: compile the terminal app on Windows - #12

Merged
wess merged 1 commit into
mainfrom
windows/app
Jul 8, 2026
Merged

Windows support — Phase 2: compile the terminal app on Windows#12
wess merged 1 commit into
mainfrom
windows/app

Conversation

@wess

@wess wess commented Jul 8, 2026

Copy link
Copy Markdown
Owner

Phase 2 of Windows support (on top of Phase 1's ConPTY backend). The entire terminal application now compiles on Windows — only the standalone relay sidecar (Phase 3) remains Unix-only.

What's here

  • IPC (ipc.rsipc/ module): the Unix-domain-socket transport moves verbatim to ipc/unix.rs; ipc/windows.rs provides graceful stubs. There's no named-pipe transport yet, so quick-terminal summon and the MCP bridge report "not supported on Windows" instead of breaking the build. Same public API (request/send_toggle/listen/socket_env/run_cli) on both platforms.
  • Window chrome: Windows uses native decorations (WindowDecorations::Server) — the OS draws the caption/controls; our tab bar sits in the client area below. The custom min/max/close overlay stays Linux-only (fixed the render.rs call-site cfg that referenced it on Windows).
  • Process control: pluginhost::force_kill() cfg-splits libc::kill (Unix) / taskkill /F /T (Windows); pluginwebview detaches its background service via creation_flags(CREATE_NEW_PROCESS_GROUP|DETACHED_PROCESS) on Windows / process_group(0) on Unix.
  • notes: the token-file chmod 0600 is now Unix-gated.
  • CI: a new gated step builds pty terminal notes app on Windows; the informational full-workspace step now only fails on relay.

Verification

Found that installing mingw-w64 lets cargo check/clippy --target x86_64-pc-windows-gnu cross-compile gpui and the whole app locally (no MSVC needed for type-check) — a fast local loop.

  • cargo check + cargo clippy --target x86_64-pc-windows-gnu: clean for pty, terminal, notes, app.
  • cargo check --workspace --target x86_64-pc-windows-gnu --keep-going: only relay fails.
  • macOS -p app -p notes build + clippy clean; no Unix regression.
  • MSVC CI on this PR is the authoritative check.

Known Windows limitations (deferred)

  • IPC stubbed: no single-instance enforcement, quick-terminal global summon, or MCP-bridge-to-GUI on Windows yet (a named-pipe transport is a focused follow-up). The terminal itself is fully functional.
  • A handful of dead-code warnings on Windows (functions whose only callers are the Unix IPC/quick-terminal paths) — build-clean, cosmetic.
  • Runtime behavior (rendering, native decorations look, driving a shell) can't be exercised in CI; needs a Windows machine to validate.

Not in scope

relay (Phase 3) and packaging — WiX/MSI + Scoop + Chocolatey (Phase 4).

Phase 2 of Windows support. With the ConPTY backend in place, port the
remaining app-crate surface so the whole terminal application builds on
Windows; only the standalone relay sidecar remains Unix-only.

- ipc: split into a module dir. The Unix-domain-socket transport moves to
  ipc/unix.rs; ipc/windows.rs provides graceful stubs (no named-pipe
  transport yet) so quick-terminal summon and the MCP bridge degrade
  cleanly instead of failing to build.
- Window chrome: Windows uses native decorations (WindowDecorations::Server);
  the custom min/max/close overlay stays Linux-only.
- pluginhost: force_kill() cfg-splits libc::kill (Unix) and taskkill (Windows).
- pluginwebview: detach the service via creation_flags on Windows,
  process_group on Unix.
- notes: gate the token-file chmod to Unix.
- CI: gate the newly-portable app stack (pty, terminal, notes, app).

Verified: cargo check/clippy --target x86_64-pc-windows-gnu clean for
pty/terminal/notes/app; macOS build + clippy clean. Whole workspace now
cross-compiles for Windows except relay (Phase 3).
@wess
wess merged commit 54eb815 into main Jul 8, 2026
3 checks passed
@wess
wess deleted the windows/app branch July 8, 2026 19:37
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