Repository navigation
feat(cli): build the user CLI for Windows x64 and ARM64 - #2146
Conversation
The walletless on-ramp installs `decdn.exe` on Windows, and CI only ever built for Linux, so the CLI did not compile there. - common: probe free disk space through `fs4` (`statvfs` on Unix, `GetDiskFreeSpaceExW` on Windows) instead of the Unix-only `nix`. - common, incentive: scope the lints the Windows placeholder functions trip, and the Unix-only `std::io::Read` import, to the Unix build. - cli: `rexpect` (pty tests, already `cfg(unix)`) is a Unix-only dev-dependency. - ci: a `windows` job lints `decdn-cli` for x86_64- and aarch64-pc-windows-msvc and smoke-runs the x64 binary through `key-gen` and `whoami`. - release: ship the CLI for aarch64-pc-windows-msvc as well (eleven archives). Co-Authored-By: Claude Opus 5.5 <[email protected]>
Gas snapshotNo gas changes vs base. |
Code Coverage OverviewLanguages: Rust, Solidity Rust / code-coverage/cargo-llvm-covThe overall line coverage in commit db9996a in the Show a line coverage summary of the most impacted files.
Solidity / code-coverage/forgeThe overall line coverage in commit db9996a in the Updated |
There was a problem hiding this comment.
Copilot review overview
🟡 Changes recommended
A few inconsistencies introduced in the updated code/docs (dependency versioning convention, misleading API naming, and comment/lint-suppression clarity) should be cleaned up before merge.
Get a fresh assessment by requesting another Copilot review.
Review effort: Lite
Findings: 4
Open (4)
What changed in this PR
This PR makes the decdn user CLI buildable (and clippy-clean) on Windows for both x64 and ARM64, and wires that support into CI and release packaging so the walletless on-ramp can install decdn.exe on Windows reliably.
Changes:
- Replace Unix-only free-disk probing with a cross-platform
fs4implementation (statvfson Unix,GetDiskFreeSpaceExWon Windows). - Adjust Unix-only identity/keystore permission helpers and CLI dev-dependencies to compile cleanly on Windows.
- Add a Windows CI job (x64 + ARM64) and extend release artifacts to include Windows ARM64 for the CLI; update release docs accordingly.
| File | Description |
|---|---|
RELEASING.md |
Updates documentation to reflect the additional Windows ARM64 CLI archive. |
crates/incentive/src/eth_identity.rs |
Makes Windows stubs fallible like Unix variants; scopes Unix-only imports. |
crates/common/src/identity.rs |
Makes Windows validation stubs return anyhow::Result<()> for signature parity. |
crates/common/src/disk.rs |
Switches disk free-space probing to cross-platform fs4. |
crates/common/Cargo.toml |
Adds fs4 dependency for the common crate. |
crates/cli/Cargo.toml |
Gates rexpect dev-dependency to Unix since the pty test is Unix-only. |
Cargo.lock |
Locks fs4 and related transitive dependency updates. |
.github/workflows/release.yml |
Adds Windows ARM64 CLI artifact and updates expected archive count. |
.github/workflows/ci.yml |
Adds Windows CI job and wires it into the branch-protection gate job. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
- ci: the branch-protection comment sits above `ci-success` again. - fs4 is a workspace dependency, like the rest. - Split the Windows-stub lint allows so each carries its own reason. Co-Authored-By: Claude Opus 5.5 <[email protected]>

Summary
The walletless on-ramp (decdn/sponsord#6) installs
decdn.exeon Windows at launch, on x64 and ARM64. CI only ever built for Linux, and the CLI didn't compile for Windows:decdn-commonprobed free disk space with the Unix-onlynix::sys::statvfs.common/disk.rs: free-space probing goes throughfs4(statvfson Unix,GetDiskFreeSpaceExWon Windows). The workspace forbidsunsafe, so a safe wrapper beats hand-written FFI.fs4builds onrustix/windows-sys, which are already in the tree.cargo denyand the crate-edges check are clean.common/identity.rs,incentive/eth_identity.rs: the Windows placeholder functions returnOk(())to match their fallible Unix variants. They get a scoped#[allow]with a reason. The Unix-onlystd::io::Readimport moves into the Unix function that uses it.cli/Cargo.toml:rexpectbecomes acfg(unix)dev-dependency. The pty test that uses it was already#![cfg(unix)].windowsjob, gated like the other Rust jobs and wired intoCI success. It runscargo clippy -p decdn-cli -D warningsforx86_64-pc-windows-msvcandaarch64-pc-windows-msvc. The x64 leg smoke-runs the builtdecdn.exethrough--version,key-gen, andwhoami, and checks both report the same address. Test suites stay Linux-only: several drive POSIX-only surfaces (ptys, mode bits).aarch64-pc-windows-msvc, cross-compiled on the x64 runner.EXPECTED_ARCHIVESgoes 10 → 11 andRELEASING.mdis updated to match.Test plan
cross check/cross clippy -p decdn-cli -D warningsforx86_64-pc-windows-gnu(mingw): cleandecdn.exebuilt with cross and run under Wine:key-genwritesC:\decdn-smoke\keystore.json, andwhoamireports the same addresscargo clippy -p decdn-common -p decdn-incentive -p decdn-cli --all-targets -D warnings,cargo nextest run -p decdn-common -p decdn-incentive(718 passed),cargo deny check, crate edges, all pre-commit hookswindowsCI job on real MSVC runners (x64 + ARM64). This is the authoritative check.🤖 Generated with Claude Code