Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

deploy: enable all wasmparser features #21

Merged
merged 1 commit into from
May 7, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading