Build and publish macOS release binaries #35
merged
cole.christensen@gmail.com wants to merge
fix/macos-release-builds
into main
No CI
Summary
anvil update returned HTTP 404 on macOS because releases only ever published Linux binaries. The server (runner_download_controller.ex) and CLI (update.rs) already map Darwin/{aarch64,x86_64} → macos_{arm64,amd64}; the gap was the build script never producing them.
What it took (three obstacles, each verified by reproducing in Docker)
- Publish the targets — add
aarch64/x86_64-apple-darwinto the zigbuild matrix, stage + version, include inSHA256SUMS, upload inrelease create. glibc-floor gate stays linux-only. - macOS SDK — zig bundles glibc/musl but not Apple’s non-redistributable libSystem/frameworks.
std+iana-time-zone(viachrono) link CoreFoundation, so an SDK is required. Fetch pinnedjoseluisq/macosx-sdks12.3, point cargo-zigbuild at it viaSDKROOT;MACOSX_DEPLOYMENT_TARGET=11.0. - zig 0.14.0 iconv regression — even with the SDK, link failed:
unable to find dynamic system library 'iconv'/'charset'. Root cause is zig 0.14.0’s macho linker: under rust ≥ 1.82 apple std links-liconv/-lcharset(rust#128370) and zig 0.14.0 can’t resolve them from the SDK — theSDKROOTpath gets doubled (cargo-zigbuild#316). Bumping cargo-zigbuild alone did not help; the variable is the zig version. zig 0.15.2 resolves it (cargo-zigbuild 0.22.3 → 0.23.0 in lockstep).
Verification
Ran the real build-runner.sh end-to-end in Docker (rust:1.95-trixie, the CI runner image): all four targets link — linux arm64/amd64 + macos arm64/amd64 — and the glibc-floor gate still passes (both linux binaries max GLIBC_2.30 ≤ 2.31). Rebased on main so this branch also carries the #27 log-visibility fix.
Closes #26
Created Jul 13, 2026 at 00:25 UTC
| Merged Jul 13, 2026 at 04:05 UTC
by
cole.christensen@gmail.com