Bump wasmtime to 0.38.0 and zstd to 0.11.2 (#11720)

* Bump `wasmtime` to 0.37.0 and `zstd` to 0.11.2

* Bump `wasmtime` to 0.38.0
This commit is contained in:
Koute
2022-06-24 20:25:21 +09:00
committed by GitHub
parent b357ecd467
commit 025e1d76f1
9 changed files with 110 additions and 97 deletions
@@ -34,7 +34,7 @@ where
{
let mut pending_func_imports = HashMap::new();
for import_ty in module.imports() {
let name = import_name(&import_ty)?;
let name = import_ty.name();
if import_ty.module() != "env" {
return Err(WasmError::Other(format!(
@@ -121,13 +121,3 @@ impl<'a, 'b> sp_wasm_interface::HostFunctionRegistry for Registry<'a, 'b> {
Ok(())
}
}
/// When the module linking proposal is supported the import's name can be `None`.
/// Because we are not using this proposal we could safely unwrap the name.
/// However, we opt for an error in order to avoid panics at all costs.
fn import_name<'a, 'b: 'a>(import: &'a ImportType<'b>) -> Result<&'a str, WasmError> {
let name = import.name().ok_or_else(|| {
WasmError::Other("The module linking proposal is not supported.".to_owned())
})?;
Ok(name)
}
@@ -323,7 +323,6 @@ fn common_config(semantics: &Semantics) -> std::result::Result<wasmtime::Config,
config.wasm_bulk_memory(false);
config.wasm_multi_value(false);
config.wasm_multi_memory(false);
config.wasm_module_linking(false);
config.wasm_threads(false);
config.wasm_memory64(false);