Upgrade wasm crate dependencies (#12173)

* Upgrade wasm crate dependencies

* New wasmi version changed error output a bit

* ".git/.scripts/bench-bot.sh" pallet dev pallet_contracts

* ".git/.scripts/bench-bot.sh" pallet dev pallet_contracts

Co-authored-by: command-bot <>
This commit is contained in:
Alexander Theißen
2022-09-08 13:48:19 +01:00
committed by GitHub
parent 6c5d4668d0
commit 5afe00d89c
19 changed files with 708 additions and 685 deletions
+2 -8
View File
@@ -12,16 +12,10 @@ readme = "README.md"
[package.metadata.docs.rs]
targets = ["x86_64-unknown-linux-gnu"]
[target.'cfg(target_arch = "wasm32")'.dependencies]
wasmi = { version = "0.9.1", default-features = false, features = ["core"] }
[target.'cfg(not(target_arch = "wasm32"))'.dependencies]
wasmi = "0.9.0"
[dependencies]
codec = { package = "parity-scale-codec", version = "3.0.0", default-features = false }
log = { version = "0.4", default-features = false }
wasmi = { version = "0.9.0", optional = true }
wasmi = { version = "0.13", default-features = false }
sp-core = { version = "6.0.0", default-features = false, path = "../core" }
sp-io = { version = "6.0.0", default-features = false, path = "../io" }
sp-std = { version = "4.0.0", default-features = false, path = "../std" }
@@ -40,7 +34,7 @@ std = [
"sp-io/std",
"sp-std/std",
"sp-wasm-interface/std",
"wasmi",
"wasmi/std",
]
strict = []
wasmer-sandbox = []
@@ -22,7 +22,7 @@ use alloc::string::String;
use wasmi::{
memory_units::Pages, Externals, FuncInstance, FuncRef, GlobalDescriptor, GlobalRef,
ImportResolver, MemoryDescriptor, MemoryInstance, MemoryRef, Module, ModuleInstance, ModuleRef,
RuntimeArgs, RuntimeValue, Signature, TableDescriptor, TableRef, Trap, TrapKind,
RuntimeArgs, RuntimeValue, Signature, TableDescriptor, TableRef, Trap,
};
use sp_std::{
@@ -113,7 +113,7 @@ impl<'a, T> Externals for GuestExternals<'a, T> {
ReturnValue::Value(v) => Some(to_wasmi(v)),
ReturnValue::Unit => None,
}),
Err(HostError) => Err(TrapKind::Host(Box::new(DummyHostError)).into()),
Err(HostError) => Err(Trap::host(DummyHostError)),
}
}
}