Skip to content

Commit

Permalink
Bump wasmtime to 0.38.0 and zstd to 0.11.2 (paritytech#11720)
Browse files Browse the repository at this point in the history
* Bump `wasmtime` to 0.37.0 and `zstd` to 0.11.2

* Bump `wasmtime` to 0.38.0
  • Loading branch information
koute authored and ark0f committed Feb 27, 2023
1 parent 1bc87d1 commit d7e1d69
Show file tree
Hide file tree
Showing 9 changed files with 109 additions and 96 deletions.
180 changes: 102 additions & 78 deletions Cargo.lock

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion client/executor/wasmtime/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ codec = { package = "parity-scale-codec", version = "3.0.0" }
libc = "0.2.121"
log = "0.4.17"
parity-wasm = "0.42.0"
wasmtime = { version = "0.35.3", default-features = false, features = [
wasmtime = { version = "0.38.0", default-features = false, features = [
"cache",
"cranelift",
"jitdump",
Expand Down
12 changes: 1 addition & 11 deletions client/executor/wasmtime/src/imports.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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!(
Expand Down Expand Up @@ -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)
}
1 change: 0 additions & 1 deletion client/executor/wasmtime/src/runtime.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand Down
2 changes: 1 addition & 1 deletion frame/state-trie-migration/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ log = { version = "0.4.17", default-features = false }
scale-info = { version = "2.1.1", default-features = false, features = ["derive"] }
serde = { version = "1.0.133", optional = true }
thousands = { version = "0.2.0", optional = true }
zstd = { version = "0.10.0", default-features = false, optional = true }
zstd = { version = "0.11.2", default-features = false, optional = true }
frame-benchmarking = { default-features = false, optional = true, path = "../benchmarking" }
frame-support = { default-features = false, path = "../support" }
frame-system = { default-features = false, path = "../system" }
Expand Down
2 changes: 1 addition & 1 deletion primitives/maybe-compressed-blob/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,4 @@ readme = "README.md"

[dependencies]
thiserror = "1.0"
zstd = { version = "0.10.0", default-features = false }
zstd = { version = "0.11.2", default-features = false }
2 changes: 1 addition & 1 deletion primitives/runtime/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ sp-std = { version = "4.0.0", default-features = false, path = "../std" }
[dev-dependencies]
rand = "0.7.2"
serde_json = "1.0.79"
zstd = { version = "0.10.0", default-features = false }
zstd = { version = "0.11.2", default-features = false }
sp-api = { version = "4.0.0-dev", path = "../api" }
sp-state-machine = { version = "0.12.0", path = "../state-machine" }
sp-tracing = { version = "5.0.0", path = "../../primitives/tracing" }
Expand Down
2 changes: 1 addition & 1 deletion primitives/wasm-interface/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ codec = { package = "parity-scale-codec", version = "3.0.0", default-features =
impl-trait-for-tuples = "0.2.2"
log = { version = "0.4.17", optional = true }
wasmi = { version = "0.9.1", optional = true }
wasmtime = { version = "0.35.3", default-features = false, optional = true }
wasmtime = { version = "0.38.0", default-features = false, optional = true }
sp-std = { version = "4.0.0", default-features = false, path = "../std" }

[features]
Expand Down
2 changes: 1 addition & 1 deletion utils/frame/try-runtime/cli/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ clap = { version = "3.1.18", features = ["derive"] }
log = "0.4.17"
parity-scale-codec = "3.0.0"
serde = "1.0.136"
zstd = { version = "0.10.0", default-features = false }
zstd = { version = "0.11.2", default-features = false }
remote-externalities = { version = "0.10.0-dev", path = "../../remote-externalities" }
jsonrpsee = { version = "0.14.0", default-features = false, features = ["ws-client"] }
sc-chain-spec = { version = "4.0.0-dev", path = "../../../../client/chain-spec" }
Expand Down

0 comments on commit d7e1d69

Please sign in to comment.