3 ms·
WebAssembly is an awesome technology and I'm super excited about it, but IMHO it's probably best to assume you don't need it unless you can convince yourself ot
by raboukhalil 7y ago
WebAssembly is an awesome technology and I'm super excited about it, but IMHO it's probably best to assume you don't need it unless you can convince yourself otherwise.
That said, here are a few examples of where it shines (warning: shameless plugs incoming):
- In data analysis apps, you can replace slow JavaScript calculations with WebAssembly and see significant speedups--I wrote this case study on my experience with that: https://www.smashingmagazine.com/2019/04/webassembly-speed-web-app/ https://www.smashingmagazine.com/2019/04/webassembly-speed-w...
- It's super helpful in porting games from languages like C/C++ to the web without having to rewrite the game from scratch. Here's a post I wrote about how to port a game like Asteroids to the web: https://medium.com/@robaboukhalil/porting-games-to-the-web-with-webassembly-70d598e1a3ec?source=friends_link&sk=20c835664031227eae5690b8a12514f0 https://medium.com/@robaboukhalil/porting-games-to-the-web-w...
- WebAssembly is really good for building playgrounds out of command line tools. Here's how I built one for the jq CLI: https://opensource.com/article/19/4/command-line-playgrounds-webassembly https://opensource.com/article/19/4/command-line-playgrounds..., the benefit being more secure than hosting it on the backend + much faster runtime
- I'm also excited to see how WebAssembly will impact work outside the browser: https://hacks.mozilla.org/2019/03/standardizing-wasi-a-webassembly-system-interface/ https://hacks.mozilla.org/2019/03/standardizing-wasi-a-webas..., especially with Function-as-a-service offerings that support Wasm like Cloudflare/Fastly workers, where the benefit is that I can write my function in any language + the time to initialize the function could be much faster
Another shameless plug: if you want a practical intro to WebAssembly, I self-published a book about it recently: http://levelupwasm.com/ http://levelupwasm.com/!