Update wasm-tools crates (#3997)
* Update wasm-tools crates This commit updates the wasm-tools family of crates as used in Wasmtime. Notably this brings in the update which removes module linking support as well as a number of internal refactorings around names and such within wasmparser itself. This updates all of the wasm translation support which binds to wasmparser as appropriate. Other crates all had API-compatible changes for at least what Wasmtime used so no further changes were necessary beyond updating version requirements. * Update a test expectation
This commit is contained in:
@@ -20,14 +20,14 @@ wasmtime-cache = { path = "../cache", version = "=0.37.0", optional = true }
|
||||
wasmtime-fiber = { path = "../fiber", version = "=0.37.0", optional = true }
|
||||
wasmtime-cranelift = { path = "../cranelift", version = "=0.37.0", optional = true }
|
||||
target-lexicon = { version = "0.12.0", default-features = false }
|
||||
wasmparser = "0.83.0"
|
||||
wasmparser = "0.84.0"
|
||||
anyhow = "1.0.19"
|
||||
region = "2.2.0"
|
||||
libc = "0.2"
|
||||
cfg-if = "1.0"
|
||||
backtrace = { version = "0.3.61", optional = true }
|
||||
log = "0.4.8"
|
||||
wat = { version = "1.0.36", optional = true }
|
||||
wat = { version = "1.0.42", optional = true }
|
||||
serde = { version = "1.0.94", features = ["derive"] }
|
||||
bincode = "1.2.1"
|
||||
indexmap = "1.6"
|
||||
|
||||
@@ -542,8 +542,7 @@ impl Module {
|
||||
///
|
||||
/// [binary]: https://webassembly.github.io/spec/core/binary/index.html
|
||||
pub fn validate(engine: &Engine, binary: &[u8]) -> Result<()> {
|
||||
let mut validator = Validator::new();
|
||||
validator.wasm_features(engine.config().features);
|
||||
let mut validator = Validator::new_with_features(engine.config().features);
|
||||
|
||||
let mut functions = Vec::new();
|
||||
for payload in Parser::new(0).parse_all(binary) {
|
||||
|
||||
@@ -60,7 +60,7 @@ struct WasmFeatures {
|
||||
pub reference_types: bool,
|
||||
pub multi_value: bool,
|
||||
pub bulk_memory: bool,
|
||||
pub module_linking: bool,
|
||||
pub component_model: bool,
|
||||
pub simd: bool,
|
||||
pub threads: bool,
|
||||
pub tail_call: bool,
|
||||
@@ -78,7 +78,7 @@ impl From<&wasmparser::WasmFeatures> for WasmFeatures {
|
||||
reference_types,
|
||||
multi_value,
|
||||
bulk_memory,
|
||||
module_linking,
|
||||
component_model,
|
||||
simd,
|
||||
threads,
|
||||
tail_call,
|
||||
@@ -99,7 +99,7 @@ impl From<&wasmparser::WasmFeatures> for WasmFeatures {
|
||||
reference_types,
|
||||
multi_value,
|
||||
bulk_memory,
|
||||
module_linking,
|
||||
component_model,
|
||||
simd,
|
||||
threads,
|
||||
tail_call,
|
||||
@@ -479,7 +479,7 @@ impl<'a> SerializedModule<'a> {
|
||||
reference_types,
|
||||
multi_value,
|
||||
bulk_memory,
|
||||
module_linking,
|
||||
component_model,
|
||||
simd,
|
||||
threads,
|
||||
tail_call,
|
||||
@@ -507,9 +507,9 @@ impl<'a> SerializedModule<'a> {
|
||||
"WebAssembly bulk memory support",
|
||||
)?;
|
||||
Self::check_bool(
|
||||
module_linking,
|
||||
other.module_linking,
|
||||
"WebAssembly module linking support",
|
||||
component_model,
|
||||
other.component_model,
|
||||
"WebAssembly component model support",
|
||||
)?;
|
||||
Self::check_bool(simd, other.simd, "WebAssembly SIMD support")?;
|
||||
Self::check_bool(threads, other.threads, "WebAssembly threads support")?;
|
||||
|
||||
@@ -92,7 +92,6 @@ impl ValType {
|
||||
WasmType::V128 => Self::V128,
|
||||
WasmType::FuncRef => Self::FuncRef,
|
||||
WasmType::ExternRef => Self::ExternRef,
|
||||
WasmType::ExnRef => unimplemented!(),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user