Skip to content

feat(host): the Rust host on macOS (#76 phase 3a) - #153

Merged
cachewraith merged 2 commits into
mainfrom
feat/rust-host-mac-20261027
Oct 27, 2026
Merged

cachewraith merged 2 commits into
mainfrom
feat/rust-host-mac-20261027

Conversation

@cachewraith

Copy link
Copy Markdown
Owner

Phase 3a of #76: the Rust pty host on macOS. Windows follows as 3b.

  • scripts/build-mac-host.sh builds aarch64-apple-darwin and x86_64-apple-darwin and lipos one universal wraithgrid-host into host-rs/target/release/. electron-builder bundles it in both the arm64 and the x64 app (mac.extraResources), ad-hoc signed with them; bun run dist:mac runs the script first.
  • The app looks for the binary on darwin too, and Settings → Advanced "Use the Rust host" shows on macOS (still off by default).
  • CI: the macOS build job now runs cargo test and bun run test:host (the parity suite against the Node host), as the rust-host job does on Linux. This is the first time the Rust host builds and runs on macOS: no code changes were needed to compile there, so this CI run is the check.

Why Windows is separate: portable-pty always quotes each argument on Windows, so the ready cmd.exe /d /s /c "…" line that platform.ts builds for npm .cmd CLIs (claude on Windows) can't pass through it. Windows needs a ConPTY spawn of our own with a raw command line, plus the named pipe, taskkill tree kill and Ctrl-C handling. Logged in docs/DECISIONS.md.

Not done: never run on a real Mac (only CI's parity suite); signing/notarization needs a Developer ID (the app is ad-hoc signed today, unchanged). The universal build script runs only in dist:mac (releases), not on every PR.

Refs #76

🤖 Generated with Claude Code

cachewraith and others added 2 commits October 27, 2026 08:23
- scripts/build-mac-host.sh builds aarch64 and x86_64 and lipos one
  universal wraithgrid-host into host-rs/target/release, where
  electron-builder takes it for both the arm64 and the x64 app
  (ad-hoc signed with them); `bun run dist:mac` runs it first
- the app looks for the binary on darwin too; Settings → Advanced
  "Use the Rust host" shows on macOS
- CI: the macOS build job runs cargo test and the host parity suite

Windows is phase 3b: portable-pty always quotes arguments, so the ready
cmd.exe line of an npm .cmd CLI needs a ConPTY spawn of our own.

Refs #76

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ease

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@cachewraith
cachewraith merged commit 1f53251 into main Oct 27, 2026
4 checks passed
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.

1 participant