3 ms·
The current state of WASM is not really at this level yet. You can't call directly into the browser APIs from WASM, you need a JS layer to do the API call, and
by Jasper_ 4y ago
The current state of WASM is not really at this level yet. You can't call directly into the browser APIs from WASM, you need a JS layer to do the API call, and that involves interpreting WASM linear memory. This is slow. Yes, interface-types is supposed to fix this, but it hasn't; it's caught up in a bunch of spec drama, just like the GC proposal.
WebGL still requires a lot of API calls per frame; WebGL 2 is better because of UBOs and VAOs, but not substantially.
The rust/wasm story is also really bad right now; the latest wasm-pack release has been broken for 6 months now (corrupt release tarball) with nobody interested in fixing it, and wasm-bindgen is practically on life support. Debugging is such a sad experience, too. I regret trying to use rust/wasm, personally.
- jitl 4y agoBummer! I hope interface types get well soon.