Windows support — Phase 2: compile the terminal app on Windows - #12
Merged
Conversation
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).
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Phase 2 of Windows support (on top of Phase 1's ConPTY backend). The entire terminal application now compiles on Windows — only the standalone
relaysidecar (Phase 3) remains Unix-only.What's here
ipc.rs→ipc/module): the Unix-domain-socket transport moves verbatim toipc/unix.rs;ipc/windows.rsprovides 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.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 therender.rscall-site cfg that referenced it on Windows).pluginhost::force_kill()cfg-splitslibc::kill(Unix) /taskkill /F /T(Windows);pluginwebviewdetaches its background service viacreation_flags(CREATE_NEW_PROCESS_GROUP|DETACHED_PROCESS)on Windows /process_group(0)on Unix.chmod 0600is now Unix-gated.pty terminal notes appon Windows; the informational full-workspace step now only fails onrelay.Verification
Found that installing
mingw-w64letscargo check/clippy --target x86_64-pc-windows-gnucross-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 forpty,terminal,notes,app.cargo check --workspace --target x86_64-pc-windows-gnu --keep-going: onlyrelayfails.-p app -p notesbuild + clippy clean; no Unix regression.Known Windows limitations (deferred)
Not in scope
relay(Phase 3) and packaging — WiX/MSI + Scoop + Chocolatey (Phase 4).