summaryrefslogtreecommitdiff
path: root/crates
diff options
context:
space:
mode:
authorHenry <mail@henrygressmann.de>2026-08-12 18:10:07 +0200
committerHenry <mail@henrygressmann.de>2026-08-12 18:10:07 +0200
commit68f85f6d2ed5870e497a5e87a40ec4e3f440984f (patch)
treee9e971c7b5bdeea58e7ba424fc7063b4eb98328f /crates
parente862a9ef83957b2e1e92e211922ce4e131c6e2b3 (diff)
chore: simplify validator feature set, allow compact imports
Signed-off-by: Henry <mail@henrygressmann.de>
Diffstat (limited to 'crates')
-rw-r--r--crates/parser/src/lib.rs26
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"))]