More News on WebAssembly- Jan-Erik Rediger
Another week has passed and work on WebAssembly, documentation, tooling and usage is not stopping. Here's a recap of what happened recently:
Nick Fitzgerald and Tom Tromey rewrote one of the most performance-sensitive code paths for source map parsing,
Using Rust compiled to WebAssembly they were able to run more than 5 times faster for real-world use cases.
All work is based on the
wasm32-unknown-unkown target of Rust.
Along the way they discovered a few shortcomings of this target and some bugs as well.
Lin Clark wrote another illustrated post on WebAssembly, this time introducing the new streaming compilation feature coming to Firefox 58. With this, WebAssembly can be compiled while it is streamed over the network and it will be ready to execute as soon as all the code is there. In combination with the baseline compiler in Firefox this brings another boost to running WebAssembly.
Useful new tools came out of Nick's and Tom's work as well. One of these is wasm-snip, a tool to replace unused functions, that neither the compiler nor wasm-gc were able to remove with no-ops. This should get rid of some of the code bloat still in the module. Once we get a proper linker and improved compiler this will hopefully be unnecessary.
If you're compiling to WebAssembly also take a look at binaryen, which has tools like wasm-opt for even more optimization.
Aaron started a new repository to coordinate the development of Rust and its Wasm backend. With already two dozen issues opened, there's a lot going on. Jump into the discussion and shape how Rust and WebAssembly work together.
Daniel pointed me to two new demos of Rust and WebAssembly.
wasm-astar is a A* Pathfinding example, showed on an interactive map and some writing about Jake's experience working on it.
Do you have another cool thing showing Rust & WebAssembly? Let me know by opening an issue.