Add Windows support (Phase 1) #8

Merged
razvandimescu merged 3 commits from feat/windows-support into main 2026-03-22 14:38:10 +08:00
razvandimescu commented 2026-03-22 14:14:52 +08:00 (Migrated from github.com)

Summary

  • Cross-platform paths: config_dir()%APPDATA%\numa, data_dir()%PROGRAMDATA%\numa on Windows
  • TLS directory: replaced hardcoded /usr/local/var/numa with data_dir() function
  • Windows DNS discovery: parse ipconfig /all output for upstream DNS servers
  • Fixed cfg gates: changed #[cfg(not(target_os = "macos"))] to explicit #[cfg(target_os = "linux")] to prevent Linux code compiling on Windows
  • CA trust paths: use data_dir() instead of hardcoded paths
  • CI: added check-windows job (build + clippy on windows-latest)
  • Release: added x86_64-pc-windows-msvc target with .zip packaging
  • Not included (Phase 2): numa install, numa service, CA trust via certutil.exe — these print "not supported on this OS" on Windows

Test plan

  • Native macOS build passes (make all — fmt, clippy, audit, build)
  • No regressions on macOS/Linux paths or functionality
  • CI: Windows build passes on GitHub Actions (check-windows job)
  • CI: Windows release artifact produced (numa-windows-x86_64.zip)
  • Manual: run numa.exe on Windows with non-privileged ports
  • Manual: LAN discovery between macOS and Windows machines

🤖 Generated with Claude Code

## Summary - **Cross-platform paths**: `config_dir()` → `%APPDATA%\numa`, `data_dir()` → `%PROGRAMDATA%\numa` on Windows - **TLS directory**: replaced hardcoded `/usr/local/var/numa` with `data_dir()` function - **Windows DNS discovery**: parse `ipconfig /all` output for upstream DNS servers - **Fixed cfg gates**: changed `#[cfg(not(target_os = "macos"))]` to explicit `#[cfg(target_os = "linux")]` to prevent Linux code compiling on Windows - **CA trust paths**: use `data_dir()` instead of hardcoded paths - **CI**: added `check-windows` job (build + clippy on `windows-latest`) - **Release**: added `x86_64-pc-windows-msvc` target with `.zip` packaging - **Not included (Phase 2)**: `numa install`, `numa service`, CA trust via `certutil.exe` — these print "not supported on this OS" on Windows ## Test plan - [x] Native macOS build passes (`make all` — fmt, clippy, audit, build) - [x] No regressions on macOS/Linux paths or functionality - [ ] CI: Windows build passes on GitHub Actions (`check-windows` job) - [ ] CI: Windows release artifact produced (`numa-windows-x86_64.zip`) - [ ] Manual: run `numa.exe` on Windows with non-privileged ports - [ ] Manual: LAN discovery between macOS and Windows machines 🤖 Generated with [Claude Code](https://claude.com/claude-code)
Sign in to join this conversation.