Closed ghjdegithub closed 1 month ago
This approach isn't typical in Rust, and it's not something people usually do. However, I like the idea—it could save unnecessary compilations and time. I'll look into enabling all the features in sherpa-onnx, and then I can distribute a precompiled crate with the bindings already compiled.
See https://github.com/thewh1teagle/sherpa-rs/blob/main/BUILDING.md#use-prebuild-sherpa-onnx-for-fast-compilation With this approach you can build sherpa-rs in few seconds as it uses prebuilt sherpa-onnx. Works on macOS/Linux/Windows.
I might automate this in the library and enable it by default in the future (with feature flag), but I'm still undecided. Enabling it could lead to unexpected network or linking errors. Additionally, some binaries, like those for Windows, are quite large—around 300MB since the binaries of sherpa-onnx included in the zipped package.
See https://github.com/thewh1teagle/sherpa-rs/blob/main/BUILDING.md#use-prebuild-sherpa-onnx-for-fast-compilation With this approach you can build sherpa-rs in few seconds as it uses prebuilt sherpa-onnx. Works on macOS/Linux/Windows.
I might automate this in the library and enable it by default in the future (with feature flag), but I'm still undecided. Enabling it could lead to unexpected network or linking errors. Additionally, some binaries, like those for Windows, are quite large—around 300MB since the binaries of sherpa-onnx included in the zipped package.
Yes, it takes me a very long time to recompile each time now, that is to compile sherpa-onnx and sherpa-rs, very time consuming.
Added download-binaries
feature to latest release (enabled by default).
Now sherpa-rs relay on compiled sherpa-onnx. also, it caches it across different projects!
It took to me 10 seconds to compile sherpa-rs on macOS.
I mean the source code that depends on sherpa-onnx, not the already compiled library