Skip to content

Commit

Permalink
chore: enable all wasmparser features (#20)
Browse files Browse the repository at this point in the history
  • Loading branch information
zshipko committed May 7, 2024
1 parent 785d796 commit 7c3255a
Show file tree
Hide file tree
Showing 3 changed files with 97 additions and 10 deletions.
98 changes: 94 additions & 4 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,4 @@ edition = "2021"
crate-type = ["staticlib", "cdylib"]

[dependencies]
wasmparser = "0.201"
wasmparser = "0.206"
7 changes: 2 additions & 5 deletions src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
use std::io::Read;
use wasmparser::{Chunk, Parser, Payload::*, Validator};
use wasmparser::{Chunk, Parser, Payload::*, Validator, WasmFeatures};

fn err<T: ToString>(x: T) -> String {
x.to_string()
Expand All @@ -10,10 +10,7 @@ fn validate(mut reader: impl Read) -> Result<(), String> {
let mut parser = Parser::new(0);
let mut eof = false;
let mut stack = Vec::new();
let mut validator = Validator::new_with_features(wasmparser::WasmFeatures {
component_model: true,
..Default::default()
});
let mut validator = Validator::new_with_features(WasmFeatures::all());

loop {
let (payload, consumed) = match parser
Expand Down

0 comments on commit 7c3255a

Please sign in to comment.