Windows support for the CLI and CI runner #32
open
cole.christensen@gmail.com wants to merge
feat/windows-support
into main
No CI
Mergeable
Build/run anvil on Windows, sharing nearly all Rust with Unix via a thin platform layer.
Runner/CLI
- platform module (process liveness/kill, privilege, bare shell): unix + windows backends
- native Windows Service (SCM): install/control + auto-restart, SCM worker, dispatch in main.rs
- detached daemon (creation flags) + graceful
runner stopvia a named stop-event - update.rs: windows_amd64/arm64 naming + move-aside .exe swap
Windows CI in a container (host-isolated, parity with Linux steps)
- execute_docker Windows path: C:\workspace mount/workdir, PowerShell entrypoint, no host-gateway/chown
- prepare.rs: prepared Windows images via PowerShell with $LASTEXITCODE fail-fast chaining
- build-windows.ps1 loads the MSVC dev shell so cargo can link in-container
- .anvil.yml: per-OS build steps; build-windows uses a servercore image + prepare block (installs toolchain, cached); build-macos runs bare (no macOS containers exist)
Verified on Windows: cargo build/clippy/fmt clean, 131 tests pass, real SCM + detached lifecycle exercised. Container build path compiles but needs iteration on a real Windows-container runner (Docker in Windows-containers mode; exact choco packages).
Server side: fangorn/anvil#187 (https://anvil.fangorn.io/fangorn/anvil/pull/187)
Created Jun 14, 2026 at 15:45 UTC