You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
The text was updated successfully, but these errors were encountered:
We want to expose the version set in the Javy Core crate's
Cargo.toml
as part of thejavy_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 usewasmparser
). We should be able to use a singlei64
by reserving different ranges of bits in thei64
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.The text was updated successfully, but these errors were encountered: