Fix compile issues in wasm-beep example (#723)
Fixes #721 Changes to a dependency library broke compilation of the example. Changes needed to get the example working and warning-free include: 1. specifying additional type constraints in local implementations 2. using the `FromSample` trait to convert samples in the handler 3. adding a default matcher in response to the non-exhaustive attribute on `SampleFormat` Also adds a github action to ensure the wasm-beep example compiles.
This commit is contained in:
parent
a9b34ea8bc
commit
edecb26ff3
2 changed files with 19 additions and 3 deletions
14
.github/workflows/cpal.yml
vendored
14
.github/workflows/cpal.yml
vendored
|
|
@ -313,3 +313,17 @@ jobs:
|
|||
- name: Build iphonesimulator feedback example
|
||||
run: cd examples/ios-feedback && xcodebuild -scheme cpal-ios-example -configuration Debug -derivedDataPath build -sdk iphonesimulator
|
||||
|
||||
wasm-beep-build:
|
||||
# this only confirms that the Rust source builds
|
||||
# and checks to prevent regressions like #721.
|
||||
#
|
||||
# It does not test the javascript/web integration
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- name: Install Target
|
||||
run: rustup target add wasm32-unknown-unknown
|
||||
- name: Cargo Build
|
||||
working-directory: ./examples/wasm-beep
|
||||
run: cargo build --target wasm32-unknown-unknown
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue