Skip to content

Commit

Permalink
chore: update wasm-encoder dependency to 0.38.1 (#256)
Browse files Browse the repository at this point in the history
  • Loading branch information
obycode committed Jan 31, 2024
1 parent a2ce442 commit 912142f
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 deletions.
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ leb128 = "0.2.4"
log = "0.4.8"
rayon = { version = "1.1.0", optional = true }
walrus-macro = { path = './crates/macro', version = '=0.19.0' }
wasm-encoder = "0.29.0"
wasm-encoder = "0.38.1"
wasmparser = "0.80.2"
gimli = "0.26.0"

Expand Down
10 changes: 6 additions & 4 deletions src/module/elements.rs
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,10 @@ impl Emit for ModuleElements {
None => wasm_encoder::ConstExpr::ref_null(wasm_encoder::HeapType::Func),
})
.collect();
let els = wasm_encoder::Elements::Expressions(els_vec.as_slice());
let els = wasm_encoder::Elements::Expressions(
wasm_encoder::RefType::FUNCREF,
els_vec.as_slice(),
);
emit_elem(cx, &mut wasm_element_section, &element.kind, els);
} else {
let els_vec: Vec<u32> = element
Expand All @@ -212,15 +215,14 @@ impl Emit for ModuleElements {
wasm_element_section.active(
table_index,
&offset.to_wasmencoder_type(&cx),
wasm_encoder::RefType::FUNCREF,
els,
);
}
ElementKind::Passive => {
wasm_element_section.passive(wasm_encoder::RefType::FUNCREF, els);
wasm_element_section.passive(els);
}
ElementKind::Declared => {
wasm_element_section.declared(wasm_encoder::RefType::FUNCREF, els);
wasm_element_section.declared(els);
}
}
}
Expand Down

0 comments on commit 912142f

Please sign in to comment.