[GH-ISSUE #1792] Add Intel Mac Support #547

Closed
opened 2026-11-02 15:39:56 +07:00 by bsakaguchi · 3 comments
Owner

Originally created by @alanwang233233 on GitHub (Oct 25, 2026).
Original GitHub issue: https://github.com/horizon-rust/horizon/issues/1792

Originally created by @alanwang233233 on GitHub (Oct 25, 2026). Original GitHub issue: https://github.com/horizon-rust/horizon/issues/1792
Author
Owner

@socksprox commented on GitHub (Oct 25, 2026):

🤖 Agent: assessment by socksprox's AI agent (Devin / SWE-2), not by socksprox personally.

Feasibility: viable, and mostly plumbing — not game code

I checked the tree and ran the experiment on an Apple Silicon Mac:

  • cargo check -p horizon-client --target x86_64-apple-darwin — clean. wgpu/Metal, wasmtime, cpal, hidapi, objc2 all compile.
  • cargo check for the GPUI launcher — clean.
  • An x86_64 horizon-prepare build links and runs under Rosetta 2.

Almost nothing in the codebase is arch-specific:

  • No std::arch, no NEON/SSE intrinsics, no asm, no target_feature gates, no .cargo/config.toml overrides.
  • jmath already does the right thing on x86_64: it falls back to the platform libm, matching the semantics of HotSpot's x86-64 intrinsics.
  • Metal is gated on target_vendor = "apple", not arch. Every Intel Mac that can run macOS 11 (the launcher's LSMinimumSystemVersion) has Metal.
  • wasmtime/cranelift, ring, hidapi, cpal, objc2 and GPUI are all first-class on x86_64-apple-darwin.
  • The Java side is already done: java_platform() maps macos/x86_64 to mac-os, minecraft_runtimes scans every platform dir, artifacts.rs and tools/lab.py handle x86_64 natives.
  • The website's assetLabel already knows macos-x86_64 → "macOS, Intel".

The work

Code (~20 lines):

  • launcher/src/backend.rs: a macos + x86_64 cfg arm → horizon-macos-x86_64.zip (plus the matching launcher self-update asset).
  • crates/horizon-server/src/update.rs: same arm — it currently falls through to no assets.
  • tools/vanilla_client.py: NATIVES hardcodes natives-macos-arm64.jar on Darwin.
  • research-lock.json: java_runtimes pins only linux and mac-os-arm64; add mac-os if the harnesses should fetch Mojang's Intel JRE.
  • Website platform(): detect Intel via the userAgentData architecture hint where the browser offers one.

Pipeline: cross-compile on the existing arm64 Mac mini runner (rustup target add x86_64-apple-darwin, cargo build --target x86_64-apple-darwin). GitHub retired the Intel mac runners (macos-13), so there is no hosted Intel option anyway. Signing, notarization and the otool -L check are identical for an x86_64 Mach-O. The 1500-frame offscreen smoke test can run under Rosetta (arch -x86_64), which gives runtime verification without Intel hardware.

Verification caveat

Rosetta proves the code paths but not real Intel/AMD GPU drivers — different Metal feature sets and quirks than Apple Silicon. wgpu adapts, so it should run, but Intel-specific rendering bugs can only surface on real hardware. Crash telemetry already records the arch, so shipping it as "supported but lightly verified" is reasonable.

Recommendation: a detached best-effort lane, not a fourth platform

Context that shapes this: Apple has announced macOS Tahoe (26) is the last macOS release for Intel Macs — the platform is on a roughly 2–3 year sunset. The right goal is that Intel can never affect anything: no gating, no per-release cost, no obligation.

The launcher already has the mechanics for sparse builds: latest() and install_tag("latest") pick the newest release that has a build for this platform, so a release without horizon-macos-x86_64.zip is skipped automatically. An Intel launcher installs and auto-updates to the newest release carrying the Intel asset — no client logic changes needed.

The shape I'd suggest:

  • One scheduled workflow (monthly or biweekly cron + workflow_dispatch): look up the newest published tag, check it out, cargo build --target x86_64-apple-darwin on the Mac mini runner, run the Rosetta smoke test — which gates the upload, nothing else — then download the release's assets + SHA256SUMS, re-run sign_release.sh over all of them including the new zip, and upload horizon-macos-x86_64.zip plus the refreshed sums and signature to that existing release. The signing path exists (release environment); it just gets a second invocation outside release.yml.
  • The job is allowed to rot. If it fails, the worst case is Intel users see a slightly older "latest" — the launcher's asset scan handles that correctly today. Fix it when someone cares; it blocks nothing.
  • Keep x86_64 out of checks/parity/PR gating entirely. If an aarch64-only dep ever lands, the weekly job's red badge is the signal, not a blocked PR.
  • Launcher: one extra leg in launcher.yml producing horizon-launcher-macos-x86_64.zip/.dmg (package.sh takes an arch parameter). Launcher releases are rare, so always-on is cheap and self-update works through the existing LAUNCHER_ASSET scan. A nicer alternative is lipo'ing the launcher universal — one .dmg for everyone — but the separate leg reuses existing machinery.
  • "Unsupported" is communicated, not enforced: label the asset "macOS Intel (best effort, lags behind)", and one line in the install docs saying Intel builds arrive on their own schedule and the newest releases may not have one.
  • Teardown is trivial: when Intel is actually dead, delete one workflow file and one cfg arm.

Considered and set aside:

  • In-matrix leg in release.yml, even non-blocking: still pays a full extra macOS build + smoke test on every release — several times a day — on a shared self-hosted runner. That's the main cost this avoids.
  • Universal2 game binary: makes every arm64 release permanently pay ~2x build time and zip size.
  • A prerelease "unofficial" channel: maximally signals "unsupported", but prereleases are skipped by latest — it kills auto-update, so every Intel user manages versions by hand. Worse UX for no real gain.
  • Source-only: already works today (that's how the check above was done); worth documenting as the fallback for when the builds eventually stop, but it means no auto-update and requires a Rust toolchain and JDK.

Small parity note

On x86_64, jmath calls Apple libm while HotSpot-x86_64 uses Intel's own libm stubs, so there can be last-ulp differences from real-Intel vanilla in a small percentage of arguments. The same approximation already exists on Windows — not a blocker, but worth knowing.

<!-- gh-comment-id:6398187419 --> @socksprox commented on GitHub (Oct 25, 2026): 🤖 Agent: assessment by socksprox's AI agent (Devin / SWE-2), not by socksprox personally. ## Feasibility: viable, and mostly plumbing — not game code I checked the tree and ran the experiment on an Apple Silicon Mac: - `cargo check -p horizon-client --target x86_64-apple-darwin` — clean. wgpu/Metal, wasmtime, cpal, hidapi, objc2 all compile. - `cargo check` for the GPUI launcher — clean. - An x86_64 `horizon-prepare` build links and runs under Rosetta 2. Almost nothing in the codebase is arch-specific: - No `std::arch`, no NEON/SSE intrinsics, no asm, no `target_feature` gates, no `.cargo/config.toml` overrides. - `jmath` already does the right thing on x86_64: it falls back to the platform libm, matching the semantics of HotSpot's x86-64 intrinsics. - Metal is gated on `target_vendor = "apple"`, not arch. Every Intel Mac that can run macOS 11 (the launcher's `LSMinimumSystemVersion`) has Metal. - wasmtime/cranelift, ring, hidapi, cpal, objc2 and GPUI are all first-class on `x86_64-apple-darwin`. - The Java side is already done: `java_platform()` maps `macos/x86_64` to `mac-os`, `minecraft_runtimes` scans every platform dir, `artifacts.rs` and `tools/lab.py` handle x86_64 natives. - The website's `assetLabel` already knows `macos-x86_64` → "macOS, Intel". ## The work Code (~20 lines): - `launcher/src/backend.rs`: a `macos + x86_64` cfg arm → `horizon-macos-x86_64.zip` (plus the matching launcher self-update asset). - `crates/horizon-server/src/update.rs`: same arm — it currently falls through to no assets. - `tools/vanilla_client.py`: `NATIVES` hardcodes `natives-macos-arm64.jar` on Darwin. - `research-lock.json`: `java_runtimes` pins only `linux` and `mac-os-arm64`; add `mac-os` if the harnesses should fetch Mojang's Intel JRE. - Website `platform()`: detect Intel via the `userAgentData` architecture hint where the browser offers one. Pipeline: cross-compile on the existing arm64 Mac mini runner (`rustup target add x86_64-apple-darwin`, `cargo build --target x86_64-apple-darwin`). GitHub retired the Intel mac runners (macos-13), so there is no hosted Intel option anyway. Signing, notarization and the `otool -L` check are identical for an x86_64 Mach-O. The 1500-frame offscreen smoke test can run under Rosetta (`arch -x86_64`), which gives runtime verification without Intel hardware. ## Verification caveat Rosetta proves the code paths but not real Intel/AMD GPU drivers — different Metal feature sets and quirks than Apple Silicon. wgpu adapts, so it should run, but Intel-specific rendering bugs can only surface on real hardware. Crash telemetry already records the arch, so shipping it as "supported but lightly verified" is reasonable. ## Recommendation: a detached best-effort lane, not a fourth platform Context that shapes this: Apple has announced macOS Tahoe (26) is the last macOS release for Intel Macs — the platform is on a roughly 2–3 year sunset. The right goal is that Intel can never affect anything: no gating, no per-release cost, no obligation. The launcher already has the mechanics for sparse builds: `latest()` and `install_tag("latest")` pick the newest release **that has a build for this platform**, so a release without `horizon-macos-x86_64.zip` is skipped automatically. An Intel launcher installs and auto-updates to the newest release carrying the Intel asset — no client logic changes needed. The shape I'd suggest: - **One scheduled workflow** (monthly or biweekly cron + `workflow_dispatch`): look up the newest published tag, check it out, `cargo build --target x86_64-apple-darwin` on the Mac mini runner, run the Rosetta smoke test — which gates **the upload**, nothing else — then download the release's assets + `SHA256SUMS`, re-run `sign_release.sh` over all of them including the new zip, and upload `horizon-macos-x86_64.zip` plus the refreshed sums and signature to that existing release. The signing path exists (`release` environment); it just gets a second invocation outside `release.yml`. - **The job is allowed to rot.** If it fails, the worst case is Intel users see a slightly older "latest" — the launcher's asset scan handles that correctly today. Fix it when someone cares; it blocks nothing. - **Keep x86_64 out of `checks`/`parity`/PR gating entirely.** If an aarch64-only dep ever lands, the weekly job's red badge is the signal, not a blocked PR. - **Launcher:** one extra leg in `launcher.yml` producing `horizon-launcher-macos-x86_64.zip`/`.dmg` (`package.sh` takes an arch parameter). Launcher releases are rare, so always-on is cheap and self-update works through the existing `LAUNCHER_ASSET` scan. A nicer alternative is lipo'ing the launcher universal — one `.dmg` for everyone — but the separate leg reuses existing machinery. - **"Unsupported" is communicated, not enforced:** label the asset "macOS Intel (best effort, lags behind)", and one line in the install docs saying Intel builds arrive on their own schedule and the newest releases may not have one. - **Teardown is trivial:** when Intel is actually dead, delete one workflow file and one cfg arm. Considered and set aside: - **In-matrix leg in `release.yml`, even non-blocking:** still pays a full extra macOS build + smoke test on every release — several times a day — on a shared self-hosted runner. That's the main cost this avoids. - **Universal2 game binary:** makes every arm64 release permanently pay ~2x build time and zip size. - **A prerelease "unofficial" channel:** maximally signals "unsupported", but prereleases are skipped by `latest` — it kills auto-update, so every Intel user manages versions by hand. Worse UX for no real gain. - **Source-only:** already works today (that's how the check above was done); worth documenting as the fallback for when the builds eventually stop, but it means no auto-update and requires a Rust toolchain and JDK. ## Small parity note On x86_64, `jmath` calls Apple libm while HotSpot-x86_64 uses Intel's own libm stubs, so there can be last-ulp differences from real-Intel vanilla in a small percentage of arguments. The same approximation already exists on Windows — not a blocker, but worth knowing.
Author
Owner

@rdbtCVS commented on GitHub (Oct 26, 2026):

🤖 Agent: rdbtCVS’s AI agent (OpenAI Codex), triage follow-up. This duplicates the Intel Mac/macOS x86_64 request in #1161. Recommend closing this issue as a duplicate and keeping #1161 as the main tracking issue. Implementation PR #1171 is still open, so the feature should not yet be marked shipped.

<!-- gh-comment-id:6418463192 --> @rdbtCVS commented on GitHub (Oct 26, 2026): 🤖 Agent: rdbtCVS’s AI agent (OpenAI Codex), triage follow-up. This duplicates the Intel Mac/macOS x86_64 request in #1161. Recommend closing this issue as a duplicate and keeping #1161 as the main tracking issue. Implementation PR #1171 is still open, so the feature should not yet be marked shipped.
Author
Owner

@kacpherek commented on GitHub (Oct 27, 2026):

Duplicate of #1161, which tracks Intel Mac builds (PR #1171).

<!-- gh-comment-id:6453961561 --> @kacpherek commented on GitHub (Oct 27, 2026): Duplicate of #1161, which tracks Intel Mac builds (PR #1171).
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
horizon-rust/horizon#547
No description provided.