bytecodealliance / bytecodealliance/javy
Add version to quickjs provider wasm file
- Dominant language
- Rust
- Stars
- 2.7k
- Forks
- 135
- Avg merge
- 1d 44m
- Merged PRs (30d)
- 11
Description
We want to expose the version set in the Javy Core crate's `Cargo.toml` as part of the `javy_quickjs_provider.wasm` file so third-party developers using the module can inspect the version of the module and confirm it is the version they are expecting.
An ideal implementation would encode the major, minor, and patch versions inside a single `i64` exported by the Wasm module. Less ideally would be three separate exports for major, minor, and patch versions. And if that approach doesn't work, then use a custom section.
Using an export of a single `i64` is ideal because it minimizes code size and is easy for consuming code to retrieve (that is, they do not need to use `wasmparser`). We should be able to use a single `i64` by reserving different ranges of bits in the `i64` for different parts of the version and use bit shifting to encode the three components of the version and on the calling side, bit shifting to decode the three parts of the version.
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.