This repository has been archived by the owner on Aug 2, 2022. It is now read-only.
decouple wavm runtime from being required & initial support for platform specific wasm runtimes #7919
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.
Change Description
eosio's code currently assumes that both wabt and wavm wasm runtimes will be built and available. This hasn't been much of a problem except for interfering with unsupported win32 builds where our wavm fork is non functional.
Looking forward to 2.0 though, there will be more diversity in what platforms different runtimes support. It's currently looking like:
This PR adds some initial basic scaffolding to support central definition of what runtimes are supported. Frankly I don't care much for this approach as it just dumps some
#ifdefs
around which I'd rather not do. However there are aspects that make something cleaner more challenging: the way we've constructed the intrinsic registration, that we need parts of the wavm intrinsics even when not using wavm (because we use the wavm "linker" for validation), and some runtimes like EOS-VM OC have additional runtime options.There is a functional issue where if you
unittests/unit_test -- --unsupported-runtime
all the tests simply fail instead of unit_test stopping early. Butctest
is properly set up only register runtimes that are enabled.If anyone wants to take a go at a better approach before 2.0, no beef here.
As part of the above effort, this PR also makes wavm's runtime enabled only on non-win32 builds. You can experiment with this on any platform by manually changing the
if()
in the cmakelists, and see that wavm is not allowed as a runtime nor does it show up inctest
Consensus Changes
API Changes
Documentation Additions