2 ms·
Pure Wasm is, OTOH, a fairly interesting constrained platform if you keep the JS glue to a bare minimum (essentially requestAnimationFrame, call Wasm, and blit
by Sharlin 3y ago
Pure Wasm is, OTOH, a fairly interesting constrained platform if you keep the JS glue to a bare minimum (essentially requestAnimationFrame, call Wasm, and blit the TypedArray you get onto a <canvas>, plus similar for the audio) and don’t export any JS APIs to the Wasm side either. Then essentially all you can do is pure computation without side effects, writing the results to a fixed chunk of memory to be blitted. No HW acceleration, no OS services, no "unbounded" heap to allocate from at your leisure…
Of course you can do all this natively too, but you have to enforce the constraints yourself.