-
Notifications
You must be signed in to change notification settings - Fork 122
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
Support new WASM features - WIP #2065
Draft
lrubasze
wants to merge
28
commits into
develop
Choose a base branch
from
feature/support-new-wasm-features
base: develop
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Docker tags |
Docker tags |
'wabt' is no longer maintained. It does not handle 'externref' type properly. Switched to 'wat' and 'wasmprinter' from the repository https://github.com/bytecodealliance/wasm-tools which is actively maintained.
lrubasze
force-pushed
the
feature/support-new-wasm-features
branch
from
January 24, 2025 08:13
7526e96
to
338d7ed
Compare
Benchmark for d39f13aClick to view benchmark
|
lrubasze
force-pushed
the
feature/support-new-wasm-features
branch
from
January 24, 2025 18:31
1405636
to
d2ee1a3
Compare
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary
This PR attempts to add support for following WASM features in the Radix Engine:
reference-types
multi-value
The features shall be enabled with the oncoming protocol update. Change shall be backward-compatible.
Packages published before shall work in the exactly same way as before.
NOTE!
This is still work-in-progress. Still to be done:
wasm-instrument
does not support reference types at the moment.Decide if it needs updating or we can live without support (see this).
reference-types
are missing.As above decide if we need to add them or we can live without it.
InvalidTable
errors to take into account multiple tables.TODO WASM
in the codeNOTE!
*.wasm files built with Rust 1.82+ will not be compatible with historic ledger version (Rust 1.82 enables
reference-types
andmulti-value
by default)Testing
Added
*.wat
files that validate enabled featuresMissing
Changelog
ScryptoVmVersion::V1_3
, which will be set upon protocol update and enable new WASM features.WasmFeaturesConfig
module to keep WASM config in one place.ScryptoVmVersion
in Scrypto compilerwabt
crate (used to convert between*.wat
and*.wasm
files) withwat
andwasmprinter
wabt
is no longer maintained and apparently it does not handle 'externref' type properly (and maybe more).Switched to
wat
andwasmprinter
from https://github.com/bytecodealliance/wasm-tools repo, which is actively maintained.reference-proposal
allows it