Question: wouldn't using the Web MIDI api work cross-platform as well?
It depends on the browser support I think. Luckily I bypassed all that with midir. The MIDI events are emitted to React from Rust: https://github.com/ZaneH/piano-trainer/blob/6cbc15df3f529d86...
Regardless, it was just curiosity on my part - the approach you chose not only is cross-platform now, but also future proof.
Question: wouldn't using the Web MIDI api work cross-platform as well?