BlackPhlox / bevy_midi

Send and receive MIDI data to and from bevy using DAWS or MIDI Controllers
Apache License 2.0
56 stars 10 forks source link

WASM Support - Add browser example #1

Open BlackPhlox opened 3 years ago

BlackPhlox commented 3 years ago

As mentioned in #26, bevy_midi should be able to compile to wasm using: cargo build --target wasm32-unknown-unknown

However, this requires some work, as far as I understand, WebMIDI is a bit different from native implementation. Some investigation is needed to find out how different it is. Does it require that bevy_midi have compile-time changes / create a feature for wasm? etc.

midir which bevy_midi uses for the backend has an example of how to run it in the browser: https://github.com/Boddlnagg/midir/tree/master/examples/browser

We should create an example as well in the same layout structure or using cargo trunk for when running the example