Repository navigation
Bundle the sherpa runtime DLLs in the Windows installer - #103
Merged
Merged
Conversation
The Windows .msi/.exe shipped only app.exe — none of onnxruntime.dll, sherpa-onnx-c-api.dll, cargs.dll, or onnxruntime_providers_shared.dll. Since app.exe statically imports sherpa-onnx-c-api.dll, Windows can't even launch it: the installed app dies immediately with a missing-DLL error, so no model ever loads. (CI only ran `cargo build` and the release job only checked that the bundle was produced, so the gap was invisible until an install was inspected.) sherpa-rs-sys copies those DLLs to target/release at build time. Bundle them next to the executable via a platform-specific tauri.windows.conf (Tauri auto-merges it on Windows builds) — the counterpart to the existing bundle.macOS.frameworks that ships the dylibs on macOS.
tauri-build validates `resources` paths at compile time, so pointing the bundle config straight at `target/release` broke `cargo build` (debug) and would break `tauri dev` on Windows — the path only exists in a release build. Stage the four sherpa/onnxruntime DLLs from the cargo target dir into a fixed, gitignored `windows-runtime/` in build.rs (the counterpart to the macOS rpath block already there) and point the resources at that profile-independent location instead.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
.msi/.exeshipped onlyapp.exe— none ofonnxruntime.dll,sherpa-onnx-c-api.dll,cargs.dll, oronnxruntime_providers_shared.dll. Becauseapp.exestatically importssherpa-onnx-c-api.dll, the installed app can't launch at all (missing-DLL error beforemain). Verified by7z-listing the built installer: onlyapp.exe+ NSIS's own plugin DLLs were inside.sherpa-rs-syscopies those DLLs totarget/releaseat build time. A platform-specifictauri.windows.conf.json(Tauri auto-merges it on Windows builds) bundles them next to the executable — the counterpart to the existingbundle.macOS.frameworks. macOS/Linux configs are untouched.Test plan
release.ymlon this branch;7z lthewisp-windows-x64artifact and confirmonnxruntime.dll,sherpa-onnx-c-api.dll,cargs.dll,onnxruntime_providers_shared.dll, andresources/silero_vad.onnxare all present.app builds (windows)stays green (config change only; doesn't affectcargo build).