summaryrefslogtreecommitdiff
path: root/crates/parser/src/lib.rs
diff options
context:
space:
mode:
authorHenry Gressmann <mail@henrygressmann.de>2024-05-01 17:35:52 +0200
committerHenry Gressmann <mail@henrygressmann.de>2024-05-01 17:35:52 +0200
commit81dc6e7062ed86945a6253c6edaffe62ddabc631 (patch)
tree190673702389585a9b90ffe1764761a42c15fd76 /crates/parser/src/lib.rs
parent704a8da24bb9e85e712fbb745ff4d4e1b54b6914 (diff)
feat: switch back to upstream wasmparser
Signed-off-by: Henry Gressmann <mail@henrygressmann.de>
Diffstat (limited to 'crates/parser/src/lib.rs')
-rw-r--r--crates/parser/src/lib.rs8
1 files changed, 5 insertions, 3 deletions
diff --git a/crates/parser/src/lib.rs b/crates/parser/src/lib.rs
index 5fb3c48..dd10f4d 100644
--- a/crates/parser/src/lib.rs
+++ b/crates/parser/src/lib.rs
@@ -35,7 +35,7 @@ use alloc::{string::ToString, vec::Vec};
pub use error::*;
use module::ModuleReader;
use tinywasm_types::WasmFunction;
-use wasmparser::{Validator, WasmFeatures};
+use wasmparser::{Validator, WasmFeaturesInflated};
pub use tinywasm_types::TinyWasmModule;
@@ -50,7 +50,7 @@ impl Parser {
}
fn create_validator(&self) -> Validator {
- let features = WasmFeatures {
+ let features = WasmFeaturesInflated {
bulk_memory: true,
floats: true,
multi_value: true,
@@ -73,8 +73,10 @@ impl Parser {
tail_call: false,
threads: false,
multi_memory: false, // should be working mostly
+ custom_page_sizes: false,
+ shared_everything_threads: false,
};
- Validator::new_with_features(features)
+ Validator::new_with_features(features.into())
}
/// Parse a [`TinyWasmModule`] from bytes