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:
@ -13,12 +13,12 @@ edition = "2018"
|
||||
|
||||
[dependencies]
|
||||
anyhow = "1.0"
|
||||
walrus = "0.14.0"
|
||||
walrus = "0.16.0"
|
||||
|
||||
[dev-dependencies]
|
||||
rayon = "1.0"
|
||||
wasmprinter = "0.2"
|
||||
wast = "3.0"
|
||||
wast = "15.0"
|
||||
wat = "1.0"
|
||||
|
||||
[[test]]
|
||||
|
@ -162,10 +162,12 @@ fn xform_one(
|
||||
round_up_to_alignment(results_size, 8) + 8
|
||||
}
|
||||
walrus::ValType::V128 => round_up_to_alignment(results_size, 16) + 16,
|
||||
walrus::ValType::Anyref => anyhow::bail!(
|
||||
"cannot multi-value transform functions that return \
|
||||
anyref, since they can't go into linear memory"
|
||||
),
|
||||
walrus::ValType::Anyref | walrus::ValType::Funcref | walrus::ValType::Nullref => {
|
||||
anyhow::bail!(
|
||||
"cannot multi-value transform functions that return \
|
||||
reference types, since they can't go into linear memory"
|
||||
)
|
||||
}
|
||||
};
|
||||
}
|
||||
// Round up to 16-byte alignment, since that's what LLVM's emitted Wasm code
|
||||
@ -284,7 +286,9 @@ fn xform_one(
|
||||
);
|
||||
offset += 16;
|
||||
}
|
||||
walrus::ValType::Anyref => unreachable!(),
|
||||
walrus::ValType::Anyref | walrus::ValType::Funcref | walrus::ValType::Nullref => {
|
||||
unreachable!()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user