From 94afbaf4b5bb6341efd5af216f1a08118dd0c272 Mon Sep 17 00:00:00 2001 From: Robert Knight Date: Fri, 15 Mar 2024 07:43:02 +0000 Subject: [PATCH] Ensure wasm-bindgen-cli version matches wasm-bindgen in CI If there is a mismatch between the two, the wasm-bindgen CLI fails with an error such as: ``` it looks like the Rust project used to create this wasm file was linked against version of wasm-bindgen that uses a different bindgen format than this binary: rust wasm file schema version: 0.2.89 this binary schema version: 0.2.92 ``` --- .github/workflows/ci.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 5c22d171..c52785df 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -28,7 +28,8 @@ jobs: target/ key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }} - name: Install wasm-bindgen - run: which wasm-bindgen || cargo install wasm-bindgen-cli + # nb. wasm-bindgen-cli version must match `wasm-bindgen` version in Cargo.lock + run: cargo install wasm-bindgen-cli --version 0.2.89 if: ${{ matrix.os == 'ubuntu-latest' }} - name: Build run: cargo build