-
Notifications
You must be signed in to change notification settings - Fork 10
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
Getting the wasm-opt
version programatically
#106
Comments
@HCastano I am happy to include this feature, though I am interested to know your use case if you can tell me what you will be doing with the version number. The binaryen version can take two different forms, depending on whether it is being built from git or from a redistributable package. Our build script attempts to reproduce the same logic for extracting the version number as binaryen's own build system. Here is the build script code for finding the version: wasm-opt-rs/components/wasm-opt-sys/build.rs Lines 332 to 369 in edcdb73
That version is written as a string to the Exposing this to the Rust API should entail:
I'd like to call the function It might be possible to arrange for the function signature to be |
It would also be possible to expose this as a static value This method might actually require less code. I am ok with either way. |
Hey! Thanks for these bindings 😄
I want to be able to get programmatically the version of the underlying version of
wasm-opt
which was built by the library. So something likewasm_opt::VERSION
or
wasm_opt::version()
. From what I can tell the only way to do that right now is toeither parse the crate version number, or use a locally installed
wasm-opt
binary.I'd be happy to implement this myself if you point me to the right area of the codebase.
The text was updated successfully, but these errors were encountered: