mirror of
https://github.com/fluencelabs/wasm-bindgen
synced 2025-06-12 20:41:24 +00:00
Update the walrus
dependency (#2125)
This commit updates the `walrus` crate used in `wasm-bindgen`. The major change here is how `walrus` handles element segments, exposing segments rather than trying to keep a contiugous array of all the elements and doing the splitting itself. That means that we need to do mroe logic here in `wasm-bindgen` to juggle indices, segments, etc.
This commit is contained in:
@ -152,6 +152,13 @@ fn sanitize_wasm(wasm: &Path) -> Result<String> {
|
||||
for mem in module.memories.iter_mut() {
|
||||
mem.data_segments.drain();
|
||||
}
|
||||
let ids = module.elements.iter().map(|d| d.id()).collect::<Vec<_>>();
|
||||
for id in ids {
|
||||
module.elements.delete(id);
|
||||
}
|
||||
for table in module.tables.iter_mut() {
|
||||
table.elem_segments.drain();
|
||||
}
|
||||
let ids = module
|
||||
.exports
|
||||
.iter()
|
||||
|
Reference in New Issue
Block a user