3 ms·
I'm still baffled by the need for a boilerplate Javascript file to call into rust. Why can't I just include the wasm directly from HTML? Seems like someone's f
by gwbas1c 6y ago
I'm still baffled by the need for a boilerplate Javascript file to call into rust. Why can't I just include the wasm directly from HTML?
Seems like someone's feelings will be hurt when they realize that many developers want to skip JavaScript and just work with wasm.
- fb03 6y agocommittee is working on a DOM-access-directly-from-WASM spec. but for now we still need to use things like wasm-bindgen to generate the boilerplate needed for us. It's still fast, tho. Have you tried https://sandspiel.club/ https://sandspiel.club/ ?
- steveklabnik 6y agoThe browser API requires it.
- gwbas1c 6y agoIt's just two lines of JavaScript to call into wasm: 1 line to load the wasm, another to call a function in it. This adds latency, and is easily replaced by a single tag.