mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-04-26 12:17:58 +00:00
Bump wasmtime to 5.0.0 (and a few other deps) (#13160)
* Bump `wasmtime` to 4.0.0 (and a few other deps) * Use `Error::msg` instead of `anyhow!` * Bump `wasmtime` to 5.0.0 * Update `Cargo.lock` * Add `wasmtime` feature to `sp-wasm-interface` dependency
This commit is contained in:
+3
-3
@@ -371,14 +371,14 @@ fn generate_host_function_implementation(
|
||||
registry.register_static(
|
||||
#crate_::sp_wasm_interface::Function::name(&#struct_name),
|
||||
|mut caller: #crate_::sp_wasm_interface::wasmtime::Caller<T::State>, #(#ffi_args_prototype),*|
|
||||
-> std::result::Result<#ffi_return_ty, #crate_::sp_wasm_interface::wasmtime::Trap>
|
||||
-> std::result::Result<#ffi_return_ty, #crate_::sp_wasm_interface::anyhow::Error>
|
||||
{
|
||||
T::with_function_context(caller, move |__function_context__| {
|
||||
let result = std::panic::catch_unwind(std::panic::AssertUnwindSafe(|| {
|
||||
#struct_name::call(
|
||||
__function_context__,
|
||||
#(#ffi_names,)*
|
||||
).map_err(#crate_::sp_wasm_interface::wasmtime::Trap::new)
|
||||
).map_err(#crate_::sp_wasm_interface::anyhow::Error::msg)
|
||||
}));
|
||||
match result {
|
||||
Ok(result) => result,
|
||||
@@ -391,7 +391,7 @@ fn generate_host_function_implementation(
|
||||
} else {
|
||||
"host code panicked while being called by the runtime".to_owned()
|
||||
};
|
||||
return Err(#crate_::sp_wasm_interface::wasmtime::Trap::new(message));
|
||||
return Err(#crate_::sp_wasm_interface::anyhow::Error::msg(message));
|
||||
}
|
||||
}
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user