Hello! I’m working on a hobby project with Rust that compiles natively and to WASM. I use fmod while native, but would like to use it while running in WASM.
Natively, I bind to the C-api directly. This obviously is going to get more complicated in WASM.
First off, in Rust, I don’t use emscripten – I compile to the target Rust calls “wasm32-unknown-unknown”, which does not use emscripten. There is an emscripten target, but it seems like that’s not the general direction people are going, so I’d like to go for this without emscripten.
Secondly, although there are provided wasm and js files, I want to have a single WASM module output. I could instead use JS interop to get all the appropriate fmod functions, but not only does that sound slow, it also sounds painful to write and use. If that is the best option, though, then I’m willing to look into that.
Instead, I’d like to be able to compile fmod directly with my application in WASM, so that it can be contained in one module.
Forgive me for any weirdnesses in this question – I am a gamedev, not a compiler engineer, so I think like most devs, I just grit my teeth and struggle through the platform issues, so this is a bit outside my domain.