From 6a3a286504290864173ac7aa3223b50f351e0236 Mon Sep 17 00:00:00 2001 From: Yagiz Nizipli Date: Wed, 1 Jul 2026 11:00:53 -0400 Subject: [PATCH 1/3] build: update rust toolchain to 1.96.1 --- rust-toolchain.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rust-toolchain.toml b/rust-toolchain.toml index 2ce412d..1000197 100644 --- a/rust-toolchain.toml +++ b/rust-toolchain.toml @@ -1,3 +1,3 @@ [toolchain] -channel = "1.90.0" +channel = "1.96.1" profile = "default" From 5940ebcb134a0e62012b403fd449df43314b8e2c Mon Sep 17 00:00:00 2001 From: Yagiz Nizipli Date: Wed, 1 Jul 2026 11:13:42 -0400 Subject: [PATCH 2/3] ci: fix wasm32-wasip1 build/test for Rust 1.96 Rust 1.96 stopped passing `--allow-undefined` to the wasm linker, and its bundled wasm32-wasip1 std/crt1 now reference newer wasi-libc symbols (`__wasi_init_tp`, `pthread_join`, `pthread_detach`) that wasi-sdk-25 does not provide, so linking failed. - Bump wasi-sdk 25 -> 33 in ci.yml and release.yml (provides the symbols). - build.rs: wasi-sdk 27+ moved libc++/libc++abi into `eh/` and `noeh/` subdirs; add the `noeh` path (we compile with -fno-exceptions) when it exists, keeping backward compatibility with the old flat layout. - Bump wasmtime v13 -> v43 in ci.yml (matching release.yml) and update scripts/wasmtime-wrapper.sh to the modern wasmtime CLI (--max-wasm-stack -> -W max-wasm-stack, --mapdir GUEST::HOST -> --dir HOST::GUEST). Validated locally on aarch64-macos with wasi-sdk-33 + wasmtime v43: `cargo test --target wasm32-wasip1` passes for default, no-default-features and all-features. --- .github/workflows/ci.yml | 10 +++++----- .github/workflows/release.yml | 4 ++-- build.rs | 14 +++++++++++--- scripts/wasmtime-wrapper.sh | 2 +- 4 files changed, 19 insertions(+), 11 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index ef7b42a..2a0e89a 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -38,11 +38,11 @@ jobs: if: matrix.env.CARGO_BUILD_TARGET == 'wasm32-wasip1' run: | rustup target add wasm32-wasip1 - curl -LO https://github.com/WebAssembly/wasi-sdk/releases/download/wasi-sdk-25/wasi-sdk-25.0-x86_64-linux.deb - sudo dpkg --install wasi-sdk-25.0-x86_64-linux.deb - curl -LO https://github.com/bytecodealliance/wasmtime/releases/download/v13.0.0/wasmtime-v13.0.0-x86_64-linux.tar.xz - tar xvf wasmtime-v13.0.0-x86_64-linux.tar.xz - echo `pwd`/wasmtime-v13.0.0-x86_64-linux >> $GITHUB_PATH + curl -LO https://github.com/WebAssembly/wasi-sdk/releases/download/wasi-sdk-33/wasi-sdk-33.0-x86_64-linux.deb + sudo dpkg --install wasi-sdk-33.0-x86_64-linux.deb + curl -LO https://github.com/bytecodealliance/wasmtime/releases/download/v43.0.0/wasmtime-v43.0.0-x86_64-linux.tar.xz + tar xvf wasmtime-v43.0.0-x86_64-linux.tar.xz + echo `pwd`/wasmtime-v43.0.0-x86_64-linux >> $GITHUB_PATH - uses: Swatinem/rust-cache@v2 with: diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 1c101e2..feed353 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -40,8 +40,8 @@ jobs: if: matrix.env.CARGO_BUILD_TARGET == 'wasm32-wasip1' run: | rustup target add wasm32-wasip1 - curl -LO https://github.com/WebAssembly/wasi-sdk/releases/download/wasi-sdk-25/wasi-sdk-25.0-x86_64-linux.deb - sudo dpkg --install wasi-sdk-25.0-x86_64-linux.deb + curl -LO https://github.com/WebAssembly/wasi-sdk/releases/download/wasi-sdk-33/wasi-sdk-33.0-x86_64-linux.deb + sudo dpkg --install wasi-sdk-33.0-x86_64-linux.deb curl -LO https://github.com/bytecodealliance/wasmtime/releases/download/v43.0.0/wasmtime-v43.0.0-x86_64-linux.tar.xz tar xvf wasmtime-v43.0.0-x86_64-linux.tar.xz echo `pwd`/wasmtime-v43.0.0-x86_64-linux >> $GITHUB_PATH diff --git a/build.rs b/build.rs index dc641c1..746695e 100644 --- a/build.rs +++ b/build.rs @@ -157,9 +157,17 @@ fn main() { } _ => "wasm32-wasip1", }; - println!( - "cargo:rustc-link-search={wasi_sdk}/share/wasi-sysroot/lib/{wasi_sysroot_lib}" - ); + let sysroot_lib = format!("{wasi_sdk}/share/wasi-sysroot/lib/{wasi_sysroot_lib}"); + // libc and its startup objects (crt1) live directly in this directory. + println!("cargo:rustc-link-search={sysroot_lib}"); + // wasi-sdk 27+ split libc++/libc++abi into `eh/` (exceptions) and + // `noeh/` (no exceptions) subdirectories. We build with + // `-fno-exceptions`, so add the `noeh` variant to the search path + // when it exists; older wasi-sdk keeps these libs flat in `sysroot_lib`. + let noeh_lib = format!("{sysroot_lib}/noeh"); + if Path::new(&noeh_lib).exists() { + println!("cargo:rustc-link-search={noeh_lib}"); + } // Wasm exceptions are new and not yet supported by WASI SDK. build.flag("-fno-exceptions"); // WASI SDK only has libc++ available. diff --git a/scripts/wasmtime-wrapper.sh b/scripts/wasmtime-wrapper.sh index d6ece59..557e640 100755 --- a/scripts/wasmtime-wrapper.sh +++ b/scripts/wasmtime-wrapper.sh @@ -1,4 +1,4 @@ #!/bin/bash SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" cd $SCRIPT_DIR/.. -wasmtime run --max-wasm-stack=4194304 --env INSTA_WORKSPACE_ROOT=/ --mapdir "/::$(pwd)" -- "$@" +wasmtime run -W max-wasm-stack=4194304 --env INSTA_WORKSPACE_ROOT=/ --dir "$(pwd)::/" -- "$@" From 82ca4c2138d5b2e1ffc000ebc6dbc8a072de9ed6 Mon Sep 17 00:00:00 2001 From: Yagiz Nizipli Date: Wed, 1 Jul 2026 11:16:02 -0400 Subject: [PATCH 3/3] ci: update wasmtime to v46.0.1 Latest wasmtime release. Validated locally on aarch64-macos: wasip1 tests pass with wasi-sdk-33 + wasmtime v46.0.1 (wrapper CLI flags unchanged). --- .github/workflows/ci.yml | 6 +++--- .github/workflows/release.yml | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 2a0e89a..8d64877 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -40,9 +40,9 @@ jobs: rustup target add wasm32-wasip1 curl -LO https://github.com/WebAssembly/wasi-sdk/releases/download/wasi-sdk-33/wasi-sdk-33.0-x86_64-linux.deb sudo dpkg --install wasi-sdk-33.0-x86_64-linux.deb - curl -LO https://github.com/bytecodealliance/wasmtime/releases/download/v43.0.0/wasmtime-v43.0.0-x86_64-linux.tar.xz - tar xvf wasmtime-v43.0.0-x86_64-linux.tar.xz - echo `pwd`/wasmtime-v43.0.0-x86_64-linux >> $GITHUB_PATH + curl -LO https://github.com/bytecodealliance/wasmtime/releases/download/v46.0.1/wasmtime-v46.0.1-x86_64-linux.tar.xz + tar xvf wasmtime-v46.0.1-x86_64-linux.tar.xz + echo `pwd`/wasmtime-v46.0.1-x86_64-linux >> $GITHUB_PATH - uses: Swatinem/rust-cache@v2 with: diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index feed353..046d895 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -42,9 +42,9 @@ jobs: rustup target add wasm32-wasip1 curl -LO https://github.com/WebAssembly/wasi-sdk/releases/download/wasi-sdk-33/wasi-sdk-33.0-x86_64-linux.deb sudo dpkg --install wasi-sdk-33.0-x86_64-linux.deb - curl -LO https://github.com/bytecodealliance/wasmtime/releases/download/v43.0.0/wasmtime-v43.0.0-x86_64-linux.tar.xz - tar xvf wasmtime-v43.0.0-x86_64-linux.tar.xz - echo `pwd`/wasmtime-v43.0.0-x86_64-linux >> $GITHUB_PATH + curl -LO https://github.com/bytecodealliance/wasmtime/releases/download/v46.0.1/wasmtime-v46.0.1-x86_64-linux.tar.xz + tar xvf wasmtime-v46.0.1-x86_64-linux.tar.xz + echo `pwd`/wasmtime-v46.0.1-x86_64-linux >> $GITHUB_PATH - uses: Swatinem/rust-cache@v2 with: