Skip to content

fix(deps): align wasmtime-wasi to v43 to match wasmtime - #80

Merged
Brian Krabach (bkrabach) merged 3 commits into
mainfrom
fix/wasmtime-wasi-version-mismatch
May 18, 2026
Merged

fix(deps): align wasmtime-wasi to v43 to match wasmtime#80
Brian Krabach (bkrabach) merged 3 commits into
mainfrom
fix/wasmtime-wasi-version-mismatch

Conversation

@bkrabach

Copy link
Copy Markdown
Collaborator

Summary

Fixes the Rust Core CI failure on every PR (and silently on main) caused by a wasmtime version mismatch.

Root cause

wasmtime was bumped to v43 (via dependabot in #74) but wasmtime-wasi remained pinned at v42. The two crates pulled in incompatible versions of wasmtime transitively, so wasmtime_wasi::p2::add_to_linker_sync(&mut linker) failed to type-check because the Linker<T> types came from different wasmtime versions.

error[E0308]: mismatched types
   --> crates/amplifier-core/src/bridges/wasm_tool.rs:66:43
    |
 66 |     wasmtime_wasi::p2::add_to_linker_sync(&mut linker)?;
    |     ----------------------------------- ^^^^^^^^^^^ expected `&mut Linker<_>`, found `&mut Linker<WasmState>`
    |     |
    |     arguments to this function are incorrect
    |
note: there are multiple different versions of crate `wasmtime` in the dependency graph
   --> wasmtime-42.0.1/src/runtime/component/linker.rs:61:1
   ::: wasmtime-43.0.2/src/runtime/component/linker.rs:61:1

Fix

One-line bump of wasmtime-wasi from "42" to "43" in crates/amplifier-core/Cargo.toml. Both crates now resolve to 43.0.2 cleanly.

Verification

All four Rust Core CI commands run locally:

Step Result
cargo check -p amplifier-core --features wasm
cargo check -p amplifier-core -p amplifier-core-py
cargo test -p amplifier-core --no-run
cargo fmt -p amplifier-core -p amplifier-core-py --check
cargo clippy -p amplifier-core -p amplifier-core-py -- -D warnings

Notes

  • Workflow trigger config in .github/workflows/rust-core-ci.yml is on: pull_request: [main, rust-core] — does NOT run on push to main. That's why main went red silently. Worth a separate follow-up to add push: [main] so future regressions are caught immediately.

Brian Krabach (bkrabach) and others added 3 commits May 18, 2026 05:43
The wasmtime crate was bumped to v43 (via dependabot PR #74) but
wasmtime-wasi remained pinned at v42, pulling two incompatible
wasmtime versions into the dependency graph:

    error[E0308]: mismatched types
       --> crates/amplifier-core/src/bridges/wasm_tool.rs:66:43
        |
     66 |     wasmtime_wasi::p2::add_to_linker_sync(&mut linker)?;
        |     ---------------------------------- ^^^^^^^^^^^ expected
        |              `&mut Linker<_>`, found `&mut Linker<WasmState>`
        |
    note: there are multiple different versions of crate `wasmtime`
          in the dependency graph

This broke Rust Core CI on every PR (and silently on main, since the
workflow only triggers on PRs targeting main).

Fix: bump wasmtime-wasi to v43, aligning with the wasmtime crate.
Both now resolve to 43.0.2.

Verified locally with all four CI commands from .github/workflows/rust-core-ci.yml:
  - cargo check -p amplifier-core --features wasm   ✓
  - cargo check -p amplifier-core -p amplifier-core-py   ✓
  - cargo test -p amplifier-core --no-run   ✓
  - cargo fmt -p amplifier-core -p amplifier-core-py --check   ✓
  - cargo clippy -p amplifier-core -p amplifier-core-py -- -D warnings   ✓

Co-authored-by: Amplifier <amplifier@microsoft.com>
Patch bump for the wasmtime-wasi alignment fix. Triggers PyPI wheel
publication via Build Wheels workflow when v1.5.3 tag is pushed.

Co-authored-by: Amplifier <amplifier@microsoft.com>
Missed this version stamp in the previous bump commit. The Python
package's runtime __version__ must match pyproject.toml and the Cargo
crate versions, or installed builds report stale version.

Co-authored-by: Amplifier <amplifier@microsoft.com>
@bkrabach
Brian Krabach (bkrabach) merged commit 7632604 into main May 18, 2026
6 checks passed
@bkrabach
Brian Krabach (bkrabach) deleted the fix/wasmtime-wasi-version-mismatch branch May 18, 2026 13:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant