Skip to content

Build zmx as a universal macOS binary so Intel Macs can launch terminals#360

Merged
sbertix merged 1 commit into
mainfrom
sbertix/359-intel-zmx
May 26, 2026
Merged

Build zmx as a universal macOS binary so Intel Macs can launch terminals#360
sbertix merged 1 commit into
mainfrom
sbertix/359-intel-zmx

Conversation

@sbertix
Copy link
Copy Markdown
Collaborator

@sbertix sbertix commented May 26, 2026

Summary

  • v0.10.0 shipped an arm64-only zmx helper inside an otherwise universal supacode.app, so every terminal on Intel Macs failed to start with bad CPU type in executable the moment Ghostty execed the bundled helper.
  • Cross-compile zmx for both x86_64-macos and aarch64-macos, lipo the slices into a single universal binary at .build/zmx/bin/zmx, and fail the build with a -verify_arch assertion if either slice ever goes missing. Per-slice prefixes/caches keep incremental rebuilds fast; the fingerprint short-circuit still gates rebuilds.
  • Drop the legacy ${zmx_build_root}/.zig-cache directory left behind by the previous single-target layout so upgraded checkouts reclaim the orphaned disk usage.

Test plan

  • make build-app succeeds on arm64 host.
  • file .build/zmx/bin/zmx reports Mach-O universal binary with 2 architectures: [x86_64] [arm64].
  • file supacode.app/Contents/Resources/zmx/zmx (Debug bundle) reports the same.
  • Cached re-run of build-zmx.sh short-circuits in ~90 ms.
  • lipo -verify_arch exits non-zero with a printed locator when fed a thin slice.
  • Smoke test on Intel hardware (no local arm64 → x86_64 runtime).

Close #359

v0.10.0 shipped an arm64-only `zmx` helper inside an otherwise universal
`supacode.app`, so every terminal on Intel Macs failed to start with
"bad CPU type in executable" the moment Ghostty execed the bundled
helper.

Cross-compile zmx for both `x86_64-macos` and `aarch64-macos`, `lipo`
the slices into a single universal binary at `.build/zmx/bin/zmx`, and
fail the build with a `-verify_arch` assertion if either slice ever
goes missing. Per-slice prefixes/caches mean incremental rebuilds stay
fast; the existing fingerprint short-circuit still gates rebuilds.

Also drop the legacy `${zmx_build_root}/.zig-cache` directory left
behind by the previous single-target layout so upgraded checkouts
reclaim the orphaned disk usage.
@sbertix sbertix enabled auto-merge (squash) May 26, 2026 13:35
@tuist
Copy link
Copy Markdown

tuist Bot commented May 26, 2026

🛠️ Tuist Run Report 🛠️

Builds 🔨

Scheme Status Duration Commit
supacode 3m 22s 0af147eb4

@sbertix sbertix merged commit 4d50d48 into main May 26, 2026
2 of 4 checks passed
@sbertix sbertix deleted the sbertix/359-intel-zmx branch May 26, 2026 13:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Bundled zmx in v0.10.0 is arm64-only — breaks Supacode on Intel Macs

1 participant