Skip to content

Fix macOS Moonshine runtime bundling#3

Merged
OBress merged 1 commit intoOBress:mainfrom
maxschmieder05-create:fix-macos-shared-sherpa
May 10, 2026
Merged

Fix macOS Moonshine runtime bundling#3
OBress merged 1 commit intoOBress:mainfrom
maxschmieder05-create:fix-macos-shared-sherpa

Conversation

@maxschmieder05-create
Copy link
Copy Markdown
Contributor

Summary

Fixes the remaining macOS runtime failure after the Intel DMG fix: the app now runs locally on macOS, loads Moonshine, and packages the required shared libraries into the .app bundle.

Root cause

macOS was using the static sherpa-onnx build. On an Apple Silicon Mac, startup warm-up crashed during ONNX Runtime session creation with an uncaught Ort::Exception while loading the Moonshine model. Switching macOS to sherpa-onnx shared matches the other platforms and avoids the C++ exception crossing the Rust/static-library boundary.

There was also a local build issue: Tauri validates bundle.resources paths before beforeBundleCommand can stage runtime libraries, so local macOS cargo check / tauri dev needs validation stubs just like CI.

Changes

  • Switch macOS sherpa-onnx from static to shared.
  • Create bundle resource validation stubs from build.rs for local builds.
  • Stage macOS .dylib runtime libraries in stage-bundle-resources.cjs.
  • Bundle the macOS dylibs into Contents/MacOS.
  • Add @executable_path rpath before bundling so dyld can find the staged dylibs.
  • Make the staging script handle debug builds where Tauri sets a target triple but Cargo outputs to target/debug.
  • Update build docs/changelog for shared runtime library staging.

Validation

  • node --check scripts/stage-bundle-resources.cjs
  • cargo fmt --check
  • cargo check --all-targets
  • npm run tauri -- build --debug --bundles app
  • Launched the debug .app bundle directly with VIBE_TO_TEXT_SELF_TEST=1; Moonshine loaded and self-test passed 3/3 WAV fixtures.

Note: Tauri still emits an unrelated warning that the bundle identifier dev.vibetotext.app ends with .app.

@OBress OBress marked this pull request as ready for review May 10, 2026 20:11
@OBress OBress merged commit cc3bb60 into OBress:main May 10, 2026
2 checks passed
This was referenced May 10, 2026
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