From 740b4fa3f161382f91107cead4790c1849fadd64 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 11 Sep 2026 06:33:56 +0000 Subject: [PATCH 1/2] chore(deps): bump wasmi from 1.1.0 to 2.0.0 Bumps [wasmi](https://github.com/wasmi-labs/wasmi) from 1.1.0 to 2.0.0. - [Release notes](https://github.com/wasmi-labs/wasmi/releases) - [Changelog](https://github.com/wasmi-labs/wasmi/blob/main/CHANGELOG.md) - [Commits](https://github.com/wasmi-labs/wasmi/compare/v1.1.0...v2.0.0) --- updated-dependencies: - dependency-name: wasmi dependency-version: 2.0.0 dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] --- Cargo.lock | 22 +++++++++++----------- crates/traverse-swift-host/Cargo.toml | 2 +- 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index de9d7239..454d910f 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -2993,46 +2993,46 @@ dependencies = [ [[package]] name = "wasmi" -version = "1.1.0" +version = "2.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2300d0f78cba12f14e29e8dd157ea64050c0a688179aefdb2050105805594a0c" +checksum = "78693fcdd618e0fc34af59c6b8efa9ac5d58c68df940beff4bedddb6acfe7c27" dependencies = [ "spin", "wasmi_collections", "wasmi_core", "wasmi_ir", - "wasmparser 0.239.0", + "wasmparser 0.228.0", ] [[package]] name = "wasmi_collections" -version = "1.1.0" +version = "2.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f8a8c42a2a76148d43097b1d7cc2a5bf33d5c23bd4dd69015fc887e311767884" +checksum = "8a8be2aa467cf2d29e96ff759472c36eeb44a3c81c67fc9cb76c9a24c519c557" [[package]] name = "wasmi_core" -version = "1.1.0" +version = "2.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9013136083d988725953390bf668b64b7a218fabf26f8b913bbc59546b97ee27" +checksum = "69372d5fda3ea3d1e0aa6603c7888110e0187e88ea17cd8fc2e2df0a0e1f37fa" dependencies = [ "libm", ] [[package]] name = "wasmi_ir" -version = "1.1.0" +version = "2.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ba1fa003f79156f406d62ef0e1464dc03e11ace37170e9fa7524299a75ad8f68" +checksum = "8f17b774caa13c618c7244f1ee51fe23c5e7b8538a471fa46d9949779758aed6" dependencies = [ "wasmi_core", ] [[package]] name = "wasmparser" -version = "0.239.0" +version = "0.228.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8c9d90bb93e764f6beabf1d02028c70a2156a6583e63ac4218dd07ef733368b0" +checksum = "4abf1132c1fdf747d56bbc1bb52152400c70f336870f968b85e89ea422198ae3" dependencies = [ "bitflags", ] diff --git a/crates/traverse-swift-host/Cargo.toml b/crates/traverse-swift-host/Cargo.toml index ed8e5928..4782a06a 100644 --- a/crates/traverse-swift-host/Cargo.toml +++ b/crates/traverse-swift-host/Cargo.toml @@ -11,7 +11,7 @@ description = "Apple static-library feasibility host for the Traverse runtime br crate-type = ["staticlib"] [dependencies] -wasmi = { version = "1.1.0", default-features = false } +wasmi = { version = "2.0.0", default-features = false } wat = "1" sha2 = "0.11" serde_json = "1.0.145" From c3d7a12916cf670d25f9f18ea33e8969cff69569 Mon Sep 17 00:00:00 2001 From: Enrico Piovesan Date: Sun, 13 Sep 2026 19:10:39 -0600 Subject: [PATCH 2/2] fix(swift-host): keep Module::new on wasmi 2.0 Wasmi 2.0 moved validation behind the validate feature, so the Apple host must opt back in under default-features=false. Co-authored-by: Cursor --- Cargo.lock | 14 ++++++++++++++ crates/traverse-swift-host/Cargo.toml | 2 +- crates/traverse-swift-host/src/lib.rs | 8 +++----- 3 files changed, 18 insertions(+), 6 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 454d910f..f9a58adf 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -2247,6 +2247,16 @@ version = "1.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6ce2be8dc25455e1f91df71bfa12ad37d7af1092ae736f3a6cd0e37bc7810596" +[[package]] +name = "string-interner" +version = "0.19.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "23de088478b31c349c9ba67816fa55d9355232d63c3afea8bf513e31f0f1d2c0" +dependencies = [ + "hashbrown 0.15.5", + "serde", +] + [[package]] name = "subtle" version = "2.6.1" @@ -3009,6 +3019,9 @@ name = "wasmi_collections" version = "2.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8a8be2aa467cf2d29e96ff759472c36eeb44a3c81c67fc9cb76c9a24c519c557" +dependencies = [ + "string-interner", +] [[package]] name = "wasmi_core" @@ -3035,6 +3048,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4abf1132c1fdf747d56bbc1bb52152400c70f336870f968b85e89ea422198ae3" dependencies = [ "bitflags", + "indexmap", ] [[package]] diff --git a/crates/traverse-swift-host/Cargo.toml b/crates/traverse-swift-host/Cargo.toml index 4782a06a..0b1c4822 100644 --- a/crates/traverse-swift-host/Cargo.toml +++ b/crates/traverse-swift-host/Cargo.toml @@ -11,7 +11,7 @@ description = "Apple static-library feasibility host for the Traverse runtime br crate-type = ["staticlib"] [dependencies] -wasmi = { version = "2.0.0", default-features = false } +wasmi = { version = "2.0.0", default-features = false, features = ["std", "validate", "stable"] } wat = "1" sha2 = "0.11" serde_json = "1.0.145" diff --git a/crates/traverse-swift-host/src/lib.rs b/crates/traverse-swift-host/src/lib.rs index 533dfd56..d1c9f4e2 100644 --- a/crates/traverse-swift-host/src/lib.rs +++ b/crates/traverse-swift-host/src/lib.rs @@ -10,9 +10,7 @@ use sha2::{Digest, Sha256}; use std::fmt::Write as _; #[cfg(test)] use wasmi::{Caller, Extern}; -use wasmi::{ - Config, Engine, Instance, Linker, Memory, Module, Store, StoreLimits, StoreLimitsBuilder, -}; +use wasmi::{Config, Engine, Instance, Linker, Memory, Store, StoreLimits, StoreLimitsBuilder}; const ABI_VERSION: u32 = 2; const OK: i32 = 0; @@ -167,7 +165,7 @@ fn execute_wasi_command( let mut config = Config::default(); config.consume_fuel(true); let engine = Engine::new(&config); - let module = Module::new(&engine, artifact) + let module = wasmi::Module::new(&engine, artifact) .map_err(|_| HostError::new(INVALID_INPUT, "wasi_invalid_module"))?; if module .imports() @@ -316,7 +314,7 @@ fn create_host(runtime: &[u8], expected_digest: &[u8], limits: Limits) -> Result let mut config = Config::default(); config.consume_fuel(true); let engine = Engine::new(&config); - let module = Module::new(&engine, runtime) + let module = wasmi::Module::new(&engine, runtime) .map_err(|_| HostError::new(INVALID_INPUT, "bridge_invalid_module"))?; if module.imports().next().is_some() { return Err(HostError::new(INVALID_INPUT, "bridge_ambient_import"));