Skip to content

Commit

Permalink
Ensure wasm-bindgen-cli version matches wasm-bindgen in CI
Browse files Browse the repository at this point in the history
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
```
  • Loading branch information
robertknight committed Mar 15, 2024
1 parent 6bb8b41 commit 94afbaf
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 94afbaf

Please sign in to comment.