Skip to content

Commit

Permalink
use wasmparser 100 spec tests
Browse files Browse the repository at this point in the history
  • Loading branch information
guybedford committed Feb 29, 2024
1 parent def8b51 commit 7c20ef1
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 9 deletions.
2 changes: 1 addition & 1 deletion crates/tests/tests/spec-tests
Submodule spec-tests updated 232 files
17 changes: 12 additions & 5 deletions crates/tests/tests/spec-tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -26,18 +26,25 @@ fn run(wast: &Path) -> Result<(), anyhow::Error> {
let mut config = walrus::ModuleConfig::new();
let extra_args: &[&str] = match proposal {
// stable features
None
| Some("multi-value")
Some("multi-value")
| Some("nontrapping-float-to-int-conversions")
| Some("sign-extension-ops")
| Some("mutable-global") => {
| Some("mutable-global")
| Some("simd") => {
config.only_stable_features(true);
&[]
}

Some("bulk-memory-operations") | Some("simd") => &[],
None | Some("bulk-memory-operations") => &[],

Some("reference-types") => &["--enable-reference-types"],
Some("multi-memory") => &["--enable-multi-memory"],

Some("reference-types") => &[],

Some("extended-const") => &["--enable-extended-const"],

Some("relaxed-simd") => return Ok(()),
Some("gc") => return Ok(()),

// TODO: should get threads working
Some("threads") => return Ok(()),
Expand Down
6 changes: 3 additions & 3 deletions src/module/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -136,10 +136,10 @@ impl Module {
let mut validator = Validator::new_with_features(WasmFeatures {
reference_types: !config.only_stable_features,
multi_value: true,
bulk_memory: !config.only_stable_features,
simd: !config.only_stable_features,
bulk_memory: true,
simd: true,
threads: !config.only_stable_features,
multi_memory: !config.only_stable_features,
multi_memory: true,
..WasmFeatures::default()
});

Expand Down

0 comments on commit 7c20ef1

Please sign in to comment.