Re:Building a web application with Rust and WebAssembly
by yesimahuman on Wednesday June 15, 2022 @10:32PM
(#31761930)
One thing about wasm I’m trying to understand: isn’t the bottleneck accessing DOM, WebGL, etc through JS? You’d have to have a workload that stayed away from those operations as much as possible to truly matter performance wise, no?
Re:Building a web application with Rust and WebAssembly
by FridgeSeal on Thursday June 16, 2022 @01:06AM
(#31762590)
A couple of years ago now, Mozilla had a blog post where they demonstrated that they could stream the DOM to a WASM blob and they could parse the stream, perform the diffs and updates to the DOM and stream it back, faster than the same operations could be completed in the JS runtime.
Re:Building a web application with Rust and WebAssembly
by yesimahuman on Thursday June 16, 2022 @09:49AM
(#31766017)
Interesting, but round trip is that still the case (i.e. performing the diffs and then applying them on the JS/DOM side)? Either way unlocking access to Web APIs from wasm will be transformational if it ever happens.
Another good example I learned about recently is StackBlitz, which uses it to run Node in the browser for localhost-less dev environments.