I'm working on a sound library. This library shall be used as native compilation and as WASM running in a browser.
I provided an example (runnable with
cargo run --example=name) which works fine.
Is there a way to modify that example to work in an WASM environment as well?
When targeting WASM the required packages are completely different and I don't know how to integrate that in my Cargo.toml (see https://github.com/RustAudio/cpal/blob/master/examples/wasm-beep/Cargo.toml for an example)
Where would I have to place the html and js files for those examples?
If there's no (easy) solution I'll fall back to using some dedicated example crates.