Skip to content

Commit

Permalink
Merge pull request #3473 from wasmerio/fix-wasm-uploads
Browse files Browse the repository at this point in the history
Fix wasm publish validation
  • Loading branch information
Michael Bryan authored Jan 11, 2023
2 parents 6571451 + ad33819 commit aaa23c6
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 2 deletions.
13 changes: 12 additions & 1 deletion lib/cli/src/commands/publish.rs
Original file line number Diff line number Diff line change
Expand Up @@ -640,7 +640,18 @@ mod validate {
file_name: String,
) -> anyhow::Result<()> {
use wasmparser::WasmDecoder;
let mut parser = wasmparser::ValidatingParser::new(wasm, None);
let mut parser = wasmparser::ValidatingParser::new(
wasm,
Some(wasmparser::ValidatingParserConfig {
operator_config: wasmparser::OperatorValidatorConfig {
enable_threads: true,
enable_reference_types: true,
enable_simd: true,
enable_bulk_memory: true,
enable_multi_value: true,
},
}),
);
loop {
let state = parser.read();
match state {
Expand Down
13 changes: 12 additions & 1 deletion lib/wasm-interface/src/validate.rs
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,18 @@ pub fn validate_wasm_and_report_errors(
let mut global_types: Vec<GlobalType> = vec![];
let mut fn_sigs: Vec<u32> = vec![];

let mut parser = wasmparser::ValidatingParser::new(wasm, None);
let mut parser = wasmparser::ValidatingParser::new(
wasm,
Some(wasmparser::ValidatingParserConfig {
operator_config: wasmparser::OperatorValidatorConfig {
enable_threads: true,
enable_reference_types: true,
enable_simd: true,
enable_bulk_memory: true,
enable_multi_value: true,
},
}),
);
loop {
let state = parser.read();
match state {
Expand Down

0 comments on commit aaa23c6

Please sign in to comment.