4 ms·
Came here to ask exactly this question. Further, and I don't even know if this question is a meaningful one, but are there any curated lists of libraries known
by ndarilek 10y ago
Came here to ask exactly this question.
Further, and I don't even know if this question is a meaningful one, but are there any curated lists of libraries known to work with wasm, or do you just compile something and hope for the best? I'm curious if there are any gaming-oriented sound libraries known to work well, and with bindings to Rust? I'm a blind developer with a casual interest in building audio games, a niche gaming genre that's basically what it (har har) sounds like. Unfortunately, much of what is available is Windows-only, and I'm a Linux user. But increasingly over the past few years, the web has struck me as a great platform for building these sorts of games. You don't need a powerful CPU for one thing, and the browser's built-in TTS APIs abstract away one of the biggest platform hurdles. There really isn't a good cross-platform hook into text-to-speech systems, and often you need speech presented in ways that clash with how screen readers work.
Anyhow, I've been wanting to experiment with multi-player gaming, and Rust's new wasm support along with Firefox 52's inclusion seems like a nice bit of synchronicity. If only I could find a good audio library known to work, particularly something with spatialization.
And yes, I do know about the Web Audio API, but was disappointed to learn that its panner nodes don't support more than 2 speakers. That said, I don't know if there are any wasm-compatible libraries that'd work with Rust and support 5.1. I'm also looking for a fun project to use Rust with, and an audio game that uses the strengths of both the web and Rust might be just the thing.
Pardon the diversion, but I'm stupidly excited about using the browser as a cross-platform runtime via a language more sane than JavaScript. :)
- steveklabnik 10y ago> are there any curated lists of libraries known to work with wasm I'm not aware of any specifically, but I do know at least one Rustacean who has been playing with this tweeted something like "I'm surprised but these 80 crates i've been using for advent of code work out of the box with wasm". So we'll see!
- flohofwoe 10y agoI've written a blog post about some (C/C++) libraries I found working well in asm.js/wasm: http://floooh.github.io/2016/04/09/oryol-3rd-party-code.html http://floooh.github.io/2016/04/09/oryol-3rd-party-code.html All the C libraries in there should be trivial to integrate with Rust, the C++ libs might be a bit more complicated though. For audio, I can recommend SoLoud, it's multiplatform and also works well in asm.js/wasm (and doesn't add much size): http://sol.gfxile.net/soloud/ http://sol.gfxile.net/soloud/
- hackcasual 10y agoEmscripten maintains a collection of ports specifically for using with asm.js/wasm: https://github.com/emscripten-ports https://github.com/emscripten-ports It's a bit spare, and certainly not comprehensive. I've personally gotten ICU and jsoncpp working with minimal effort. Basically if the library has good cross platform support it should work.