diff --git a/.github/workflows/platforms.yml b/.github/workflows/platforms.yml index ac6b14a22..4cb464624 100644 --- a/.github/workflows/platforms.yml +++ b/.github/workflows/platforms.yml @@ -401,6 +401,11 @@ jobs: toolchain: ${{ env.MSRV_WASM }} targets: ${{ env.TARGET }} + - name: Install Trunk + uses: taiki-e/install-action@v2 + with: + tool: trunk + - name: Rust Cache uses: Swatinem/rust-cache@v2 with: @@ -409,9 +414,11 @@ jobs: - name: Check examples (wasm-bindgen feature) run: cargo +${{ env.MSRV_WASM }} check --examples --features wasm-bindgen --workspace --verbose --target ${{ env.TARGET }} - - name: Check wasm-beep example - working-directory: examples/wasm-beep - run: cargo +${{ env.MSRV_WASM }} check --verbose --target ${{ env.TARGET }} + - name: Build wasm-beep example + working-directory: ./examples/wasm-beep + run: trunk build + env: + RUSTUP_TOOLCHAIN: ${{ env.MSRV_WASM }} # WebAssembly - AudioWorklet wasm-audioworklet: @@ -428,6 +435,11 @@ jobs: targets: ${{ env.TARGET }} components: rust-src + - name: Install Trunk + uses: taiki-e/install-action@v2 + with: + tool: trunk + - name: Rust Cache uses: Swatinem/rust-cache@v2 with: @@ -436,9 +448,11 @@ jobs: - name: Check examples (audioworklet feature) run: cargo +nightly check --examples --features audioworklet --workspace --verbose -Z build-std=std,panic_abort --target ${{ env.TARGET }} - - name: Check audioworklet-beep example - working-directory: examples/audioworklet-beep - run: cargo +nightly check -Z build-std=std,panic_abort --verbose --target ${{ env.TARGET }} + - name: Build audioworklet-beep example + working-directory: ./examples/audioworklet-beep + run: trunk build + env: + RUSTUP_TOOLCHAIN: nightly # WebAssembly - WASI Preview 1 wasm-wasip1: diff --git a/CHANGELOG.md b/CHANGELOG.md index 8245254e4..9bb3ca31f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -16,6 +16,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - **ALSA**: Device enumeration now includes both hints and physical cards. - **JACK**: No longer builds on iOS. +- **Wasm**: Fixes a regression introduced in 0.17.0 that would cause WasmBindgen to crash. ### Changed diff --git a/src/lib.rs b/src/lib.rs index e2cae1c5a..2cc9d582d 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -345,7 +345,9 @@ pub enum BufferSize { any(target_os = "emscripten", feature = "wasm-bindgen") ))] impl wasm_bindgen::describe::WasmDescribe for BufferSize { - fn describe() {} + fn describe() { + as wasm_bindgen::describe::WasmDescribe>::describe(); + } } #[cfg(all(