Skip to content

Begin macOS port: platform code paths + testable build process - #65

Draft
JRufer wants to merge 1 commit into
developmentfrom
claude/macos-port-build
Draft

Begin macOS port: platform code paths + testable build process#65
JRufer wants to merge 1 commit into
developmentfrom
claude/macos-port-build

Conversation

@JRufer

@JRufer JRufer commented Jul 24, 2026

Copy link
Copy Markdown
Owner

Summary

Starts the macOS (Apple Silicon) port and — importantly — wires up a way to build and test it in CI without merging to master. All Rust changes are additive and cfg-gated, so Linux and Windows behavior is unchanged (verified: the four touched crates cargo check clean and voxctrl-routing/voxctrl-hotkeys tests pass on Linux).

Base branch is development (there is no dev branch; development is currently identical to master).

How to test without merging to main

The new .github/workflows/macos-build.yml ("macOS Build (preview)") builds the .app + .dmg on a macos-14 runner and uploads them as run artifacts. It triggers on:

  • pushes to claude/macos-port-build (or any macos-** branch) — already runs from this PR's pushes,
  • PRs touching macOS-relevant files,
  • manual dispatch (once the file reaches the default branch), with an optional Moonshine toggle.

Download the built app from the run's Artifacts section. Nothing in release.yml (which only runs on master) is required to validate the port.

Code paths added for macOS (all cfg-gated)

  • voxctrl-mcp — bind the Unix-domain-socket server on any unix (macOS included) instead of Linux-only; added a non-unix/non-windows fallback.
  • voxctrl-routing — widened the mcp delivery client to unix; added a macOS text-injection path (pasteboard + osascript Cmd+V, mirroring the existing clipboard-paste fallback). InjectTarget is the real dictation path, which previously returned "not supported" on macOS.
  • voxctrl-inject — added a macOS inject_text path (arboard + osascript).
  • voxctrl-hotkeys — renamed the rdev listener (windows.rsrdev_backend.rs) and reused it on macOS; rdev (already the Windows backend, supports macOS via CGEventTap) added to the macOS target deps.

Build config

  • tauri.conf.json — added bundle.macOS (minimumSystemVersion).
  • src-tauri/Info.plistNSMicrophoneUsageDescription + NSAppleEventsUsageDescription (macOS terminates the app on mic access / Apple Events without these).

CI / release

  • ci.yml — added macos-14 to the cargo check matrix (full-workspace check, so the whisper.cpp/C++ crates and macOS platform code are compile-checked on every PR).
  • release.yml — added a macos-arm64 row producing VoxCtrl-macos-arm64.dmg, a downloads-table entry, and unsigned first-run instructions. Built without Moonshine for now (validate via the preview workflow first); fail-fast: false keeps the other platforms publishing.

Docs

  • docs/macos_build.md — build steps, TCC permissions (Microphone / Accessibility / Input Monitoring), signing & notarization, and CI. Linked from the docs index.

Known follow-ups (not in this PR)

  • Runtime behavioral testing on real Mac hardware (overlay always-on-top across Spaces/full-screen, injection into native/Electron apps, permission-denied degradation).
  • Code signing + notarization (needs a Developer ID cert in repo secrets) and an entitlements.plist.
  • Optional: enable Moonshine on the macOS release row once validated; optional Intel (macos-13) row.

Test plan

  • macOS Build (preview) workflow goes green and produces a runnable .dmg/.app artifact
  • cargo check job passes on macos-14
  • Existing Linux/Windows CI unaffected

🤖 Generated with Claude Code


Generated by Claude Code

Adds macOS as a build target and wires up a way to validate it before
merging to master.

Crate changes (all additive / cfg-gated; Linux and Windows unchanged):
- voxctrl-mcp: bind the Unix-domain-socket server on any unix (macOS
  included) instead of Linux-only; add a non-unix/non-windows fallback.
- voxctrl-routing: widen the mcp delivery client to unix; add a macOS
  text-injection path (pasteboard + osascript Cmd+V, mirroring the
  clipboard-paste fallback).
- voxctrl-inject: add a macOS inject_text path (arboard + osascript).
- voxctrl-hotkeys: rename the rdev listener (windows.rs -> rdev_backend.rs)
  and use it on macOS as well; add rdev to the macOS target deps.

Build/config:
- tauri.conf.json: add bundle.macOS (minimumSystemVersion).
- src-tauri/Info.plist: microphone + Apple Events usage strings (required
  by macOS TCC or the app is killed on mic access).

CI / release / testability:
- ci.yml: add macos-14 to the cargo-check matrix (full workspace check).
- macos-build.yml: NEW standalone preview workflow that builds the .app/.dmg
  on macos-14 and uploads them as artifacts. Runs on pushes to the macOS
  branch, on relevant PRs, and via manual dispatch, so the port can be tested
  without merging to master.
- release.yml: add a macos-arm64 row producing VoxCtrl-macos-arm64.dmg, plus
  downloads-table entry and unsigned first-run instructions.

Docs: docs/macos_build.md (build, TCC permissions, signing, CI) + index link.
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.

2 participants