Implement compatibility checks between munlib and runtime #188
Labels
exp: low
Achievable with little prior knowledge and guidance
good first issue
Good for newcomers
pri: intermediate
An issue resulting in non-critical functionality loss and no significant effect on usability
type: feat
New feature or request
Problem
Currently, the runtime tries to load a
*.munlib
with the assumption that the ABI memory layout of the*.munlib
matches its own ABI version. This can cause undefined behaviour when it tries to load a*.munlib
with a different ABI version.Solution
By including an ABI version in the
*.munlib
, the runtime can gracefully fail - reporting an error to the end user.In the future - once we support backwards compatibility, we can even support loading of several different ABI versions using this functionality.
Tasks
ABI_VERSION
constant to themun_abi
crate.get_version
IR functionget_version
functionget_version
function and verify that the runtime'smun_abi::ABI_VERSION
is compatible.get_version
function name (and other API functions) to themun_abi
crate and use that constant in both themun_codegen
andmun_runtime
crates - to avoid discrepancies.Good first issue process:
If this is your first PR, welcome 🎉 😄
The text was updated successfully, but these errors were encountered: