Change how wasm features/gc support work in Config
#11463
Merged
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.
This commit aims to address #11450 in complementary but somewhat orthogonal ways. First a new
Config::gc_supportoption is added which is hooked up to the CLI as-Wgc-support. This option controls the wasmparser-internalGC_TYPESfeature. Its default value, like before, iscfg!(feature = "gc")and additionally enabling it requires thegccrate feature to be enabled.This commit then additionally updates how wasm features are processed during validating a deserialized module to only require enabled features to be enabled in the host. Previously modules that disabled a feature but the feature was enabled in the host would fail to deserialize. All WebAssembly proposals are additive, however, so it's always ok to disable a feature and then load it into a module that enables the wasm proposal.
Closes #11450