Skip to content
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

Check a Rune is compatible with the current runtime when it is loaded #336

Open
2 tasks
Michael-F-Bryan opened this issue Oct 4, 2021 · 0 comments
Open
2 tasks
Labels
area - runtime The Rust Rune runtime category - intuitiveness Something which may be unintuitive to the user or affect ergonomics effort - easy This should be pretty simple good first issue Good for newcomers

Comments

@Michael-F-Bryan
Copy link
Contributor

At the moment, it's hard to make changes to the Rune-runtime interface because the Rune will fail to load due to obscure errors (e.g. an import function's signature is different or it wasn't provided).

The rune build command already embeds the rune CLI's version number in each Rune under the .rune_version custom section.

$ wasm-objdump --full-contents --section=.rune_version examples/sine/sine.rune

sine.rune:	file format wasm 0x1

Contents of section Custom:
00113bf: 0d2e 7275 6e65 5f76 6572 7369 6f6e 7b22  ..rune_version{"
00113cf: 7665 7273 696f 6e22 3a22 302e 372e 312d  version":"0.7.1-
00113df: 6465 7622 7d                             dev"}

Now we just need to emit checks and emit a warning if the Rune's version isn't semver compatible with the runtime:

  • Rust runtime
  • Web runtime

To make evolving things easier, I'd also like to not provide any backwards/forwards compatibility guarantee (cc @kthakore). At the moment, the C++ runtime forces us to be de facto backwards compatible, and it sucks.

@Michael-F-Bryan Michael-F-Bryan added good first issue Good for newcomers category - intuitiveness Something which may be unintuitive to the user or affect ergonomics effort - easy This should be pretty simple area - runtime The Rust Rune runtime labels Oct 4, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area - runtime The Rust Rune runtime category - intuitiveness Something which may be unintuitive to the user or affect ergonomics effort - easy This should be pretty simple good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

1 participant