-
Notifications
You must be signed in to change notification settings - Fork 9
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add Pre-build Binaries #12
Conversation
@magiclen is there any possibility to approve this PR in the nearer future? |
IMHO, these binaries should be published as an external assets, instead of being committed into the repo.
|
Hope the pr will be merged and release to npm. |
Update v2.1.0
Today I did some further maintenance on this project, including updates of dependencies and the build-CI. It resulted in an update v2.1.0, feel free to use it until this PR gets merged sometime. @gemwuu we do like the idea of prebuild-binaries being generated in CI and uploaded to release assets, we appreciate any help with swrlab#13. |
Adding prebuilt binaries avoids requiring Rust tooling everywhere.
In the attempt to solve this I played around with napi-rs (see rafaelmaeuer/node-crc/tree/dev/napi) unless I found out, that cargo already produces the prebuild-binary:
index.node
.After learning about the necessity of cross-platform binaries (
invalid ELF header
in Github actions) I ended up writing a build-script based on cross-rs and rustup/cross-compilation which can produce binaries for following platforms (inspired by sharp):I slightly modified the lib to load the correct binary on each platform and Mocca-Tests are still passing:
I also created a changelog file from the git history, therefore this PR closes #7, closes #8 and closes #9.
A next step would be to let github-actions produce the binaries and download them from github-artifacts on install.