Windows support — Phase 3: compile the relay sidecar (whole workspace builds on Windows) - #13
Merged
Conversation
Phase 3 of Windows support. With relay ported, the entire workspace now builds on Windows. - New crate-root `proc` module: cross-platform pid liveness + termination. Unix uses signals (SIGTERM/SIGKILL); Windows uses OpenProcess + TerminateProcess (no SIGTERM for a detached console daemon, so terminate hard-kills). Replaces the scattered libc::kill call sites in cli/server, cli/paths, and spawn. - cli/server: cfg-split the shutdown signal handler (unix SIGTERM+ctrl_c / windows ctrl_c) and the daemonize spawn (setsid via pre_exec / detached creation_flags). - cli/launch: foreground launch execs on Unix, spawn+wait+exit on Windows. - cli/paths: gate the state-dir/file chmod to Unix. - Cargo.toml: libc is now a Unix-only dep; windows crate added for Windows. - CI: the Windows job now gates a full `cargo build --workspace`. Verified: cargo check/clippy --workspace --target x86_64-pc-windows-gnu clean; macOS build + relay tests (17) still green.
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 3 of Windows support. With
relayported, the entire workspace now compiles on Windows — terminal app + sidecar.What's here
procmodule — cross-platform pid liveness + termination, shared bycliandspawn. Unix uses signals (SIGTERM/SIGKILL); Windows usesOpenProcess+TerminateProcess. Replaces the scatteredlibc::killsites incli/server,cli/paths, andspawn.cli/server— cfg-split the shutdown signal handler (UnixSIGTERM+ctrl_c/ Windowsctrl_c) and the daemonize spawn (setsidviapre_execon Unix / detachedcreation_flagson Windows).cli/launch— foreground launchexec()s on Unix; on Windows there's noexec(), so it spawns + waits + exits with the child's status.cli/paths— the state-dir/filechmodis Unix-gated.Cargo.toml—libcis now Unix-only; thewindowscrate is added for Windows.cargo build --workspace(the gpui/guise probes stay as distinct early steps for a clear signal).Verification
cargo check+cargo clippy --workspace --target x86_64-pc-windows-gnu: clean (whole workspace).relaytests (17) still green; no Unix regression.Known Windows limitations (deferred)
SIGTERMfor a detached console daemon) — workers don't get a graceful shutdown signal.What's next
Phase 4 — packaging: WiX/MSI installer + Scoop + Chocolatey, and a Windows artifact in the release workflow. That's where code-signing (SmartScreen) becomes a decision.