diff options
| author | Henry <mail@henrygressmann.de> | 2026-08-12 18:10:07 +0200 |
|---|---|---|
| committer | Henry <mail@henrygressmann.de> | 2026-08-12 18:10:07 +0200 |
| commit | 68f85f6d2ed5870e497a5e87a40ec4e3f440984f (patch) | |
| tree | e9e971c7b5bdeea58e7ba424fc7063b4eb98328f /crates/parser/src | |
| parent | e862a9ef83957b2e1e92e211922ce4e131c6e2b3 (diff) | |
chore: simplify validator feature set, allow compact imports
Signed-off-by: Henry <mail@henrygressmann.de>
Diffstat (limited to 'crates/parser/src')
| -rw-r--r-- | crates/parser/src/lib.rs | 26 |
1 files changed, 5 insertions, 21 deletions
diff --git a/crates/parser/src/lib.rs b/crates/parser/src/lib.rs index 8b6cb39..8db7920 100644 --- a/crates/parser/src/lib.rs +++ b/crates/parser/src/lib.rs @@ -170,27 +170,11 @@ impl Parser { fn validator(&self) -> Option<Validator> { #[cfg(feature = "validate")] { - let features = WasmFeatures::CALL_INDIRECT_OVERLONG - | WasmFeatures::BULK_MEMORY_OPT - | WasmFeatures::RELAXED_SIMD - | WasmFeatures::GC_TYPES - | WasmFeatures::GC - | WasmFeatures::REFERENCE_TYPES - | WasmFeatures::MUTABLE_GLOBAL - | WasmFeatures::MULTI_VALUE - | WasmFeatures::FLOATS - | WasmFeatures::BULK_MEMORY - | WasmFeatures::SATURATING_FLOAT_TO_INT - | WasmFeatures::SIGN_EXTENSION - | WasmFeatures::EXTENDED_CONST - | WasmFeatures::FUNCTION_REFERENCES - | WasmFeatures::TAIL_CALL - | WasmFeatures::MULTI_MEMORY - | WasmFeatures::SIMD - | WasmFeatures::MEMORY64 - | WasmFeatures::CUSTOM_PAGE_SIZES - | WasmFeatures::EXCEPTIONS - | WasmFeatures::WIDE_ARITHMETIC; + let features = WasmFeatures::WASM3 + .difference(WasmFeatures::THREADS) + .union(WasmFeatures::CUSTOM_PAGE_SIZES) + .union(WasmFeatures::WIDE_ARITHMETIC) + .union(WasmFeatures::COMPACT_IMPORTS); self.options.validation().then(|| Validator::new_with_features(features)) } #[cfg(not(feature = "validate"))] |
