Skip to content

feat(windows): add Windows (x86_64-pc-windows-msvc) support#1

Merged
david-burley merged 1 commit into
mainfrom
feat/windows-support
Jun 10, 2026
Merged

feat(windows): add Windows (x86_64-pc-windows-msvc) support#1
david-burley merged 1 commit into
mainfrom
feat/windows-support

Conversation

@david-burley

Copy link
Copy Markdown
Owner

Adds Windows support: compile, test, and release umb on x86_64-pc-windows-msvc.

Draft for CI validation only — not for merge yet (pending lead review).

What changed

  • router.rs untouched — the Linux subreaper + process-group orphan reap is already fully #[cfg(unix)]/#[cfg(target_os="linux")] gated, so its semantics are unchanged.
  • local_tools.rs: run_command (sh -ccmd /C on Windows), grep_files (Unix keeps real grep; Windows gets an in-process recursive search with identical output shape), portable test temp paths.
  • KNOWN_ISSUES.md: honest Windows limitation — best-effort child cleanup (kill_on_drop + explicit kill), no subreaper-grade orphan adoption (Job Objects = future hardening, not committed).
  • ci.yml: windows-latest job (default features; embed-onnx excluded on Windows).
  • release.yml: Windows build → umb-windows-x86_64.exe asset + SHA256SUMS.

Honest scoping

Windows lacks prctl/setpgid/setsid. The dominant case (normal backend + its children) is cleaned up; a deliberately-detached grandchild is not guaranteed-reaped on Windows v1. Documented, not faked.

🤖 Generated with Claude Code

Compile, test, and ship UMB on Windows. The orphan/reap surface in
src/server/router.rs was already fully #[cfg(unix)]/#[cfg(target_os="linux")]
gated, so the Linux subreaper + process-group reap semantics are UNCHANGED
(router.rs is not touched). Only platform shims in local_tools.rs were needed:

- run_command: `sh -c` on Unix, `cmd.exe /C` on Windows (cfg-gated; Unix arm
  byte-identical to before).
- grep_files: Unix keeps real `grep -rn` verbatim; Windows gets an in-process
  recursive substring search producing the same `path:lineno:line` output,
  same 200-line truncation, same `--include` glob filter (Windows has no grep).
- tests: temp paths via std::env::temp_dir() instead of hardcoded /tmp so the
  Windows test run is honestly green. Unix-only integration/reaper tests stay
  #[cfg(unix)]-gated (skipped on Windows, not deleted).

Windows child-cleanup v1 is honest: backend children are killed on every
teardown path via tokio kill_on_drop + explicit kill on shutdown. Windows
lacks prctl/setpgid/setsid, so it does NOT have the Linux subreaper-grade
orphan adoption — documented as a known limitation (Job Objects noted as
future hardening, not committed).

CI: ci.yml adds windows-latest (default features; embed-onnx excluded on
Windows). release.yml adds the x86_64-pc-windows-msvc build → asset
umb-windows-x86_64.exe, included in SHA256SUMS.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@david-burley david-burley marked this pull request as ready for review June 10, 2026 08:03
@david-burley david-burley merged commit 4e5fda1 into main Jun 10, 2026
6 checks passed
@david-burley david-burley deleted the feat/windows-support branch June 10, 2026 08:03
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