Goal
Make walgit build and run natively on Windows today's host toolchain (x86_64-pc-windows-msvc, Rust 1.97.1): core production crates currently fail to compile because several Unix-only APIs are used without #[cfg] gates.
Why
The server story is Linux-first, but contributors run Windows; nothing even type-checks there today, so portability can silently rot further. Containers remain the recommended deployment shape — this issue is about the code no longer being un-buildable off POSIX.
Batch checklist
Plus one find the audit could not have predicted: remove_pack now releases this process's own pre-warmed odb index mappings before deleting and rides out a brief scanner lock with a bounded retry — refresh() mmaps every idx by design and, unlike Unix, Windows refuses to delete a mapped file.
Acceptance
- On Windows (Win10, rustc 1.97.1 msvc): fast tier green — 185 lib/bins + 168 integration + 38 server tests, 0 failures; zero new clippy findings on touched files.
- On Ubuntu: POSIX branches byte-for-byte unchanged by construction (
#[cfg(unix)] twins of every changed seam); existing CI tiers untouched.
Non-goals left open here:
- workspace-wide clippy
-D warnings fails on main independent of OS (strict-gate pedantic debt landed on main red);
just e2e / sim suites not yet ported (the shebang-shim test is unix-only by mechanism).
Branch: windows-port on @gqf2008's fork (commit 8a5aa2e). Upstream PR awaits maintainer authorization per contributor policy.
Goal
Make walgit build and run natively on Windows today's host toolchain (
x86_64-pc-windows-msvc, Rust 1.97.1): core production crates currently fail to compile because several Unix-only APIs are used without#[cfg]gates.Why
The server story is Linux-first, but contributors run Windows; nothing even type-checks there today, so portability can silently rot further. Containers remain the recommended deployment shape — this issue is about the code no longer being un-buildable off POSIX.
Batch checklist
walgit-wal/src/registry.rs: hard-link-awaredir_size(MetadataExtdev/ino/nlink) anddisk_usage(libc::statvfs) are ungated Unix code — add per-OS implementations behindcfgwalgit-wal/src/sync.rs,walgit-cli/src/import_direct.rs,walgit-server/src/rebuild.rsincl. itsstatvfsfree-space probe) — converged into a new platform seam,crates/walgit-wal/src/platform.rswalgit-server/src/tls.rs: POSIX permission bits on key/session files need gating (already gated; verified)cache.dirdefault/tmp/walgitand the--config /dev/nullsentinel are POSIX-shapedsh/ usingPermissionsExt/libc::rusage: gate or cross-platformize (git_pipebuffered pipes ×4 suites; symmetric cfg gates; detect-and-speak skips).cargo/config.toml:GIT_CONFIG_GLOBAL=/dev/nullon Windows — kept single-valued with a truthful note (git reads an unopenable global config as empty); constant-exercised by every cargo-spawned git in the suitecfg(windows)branch (reachability rule: no ungated-but-unbuilt branches)Plus one find the audit could not have predicted:
remove_packnow releases this process's own pre-warmed odb index mappings before deleting and rides out a brief scanner lock with a bounded retry —refresh()mmaps every idx by design and, unlike Unix, Windows refuses to delete a mapped file.Acceptance
#[cfg(unix)]twins of every changed seam); existing CI tiers untouched.Non-goals left open here:
-D warningsfails on main independent of OS (strict-gate pedantic debt landed on main red);just e2e/ sim suites not yet ported (the shebang-shim test is unix-only by mechanism).Branch:
windows-porton @gqf2008's fork (commit8a5aa2e). Upstream PR awaits maintainer authorization per contributor policy.