Google Earth is a desktop application, written in C++, that has been providing a rich interactive mapping experience for the past 14 years. There is currently a project underway to port this to the web using Emscripten, with a public preview having just been released. This is a fantastic showcase for WebAssembly, which also makes use of multi-threading, a WebAssembly feature that is still in preview.
Most Blazor demos showcase it’s ability to create interactive UIs using Razor, so it’s a nice change to see an example that has a command-line interface instead. This blog post uses Roslyn, the C# compiler platform, to create an interactive C# REPL the runs n the browser.
WebAssembly is typically delivered over the browser via HTTP, so one of its initial design constraints was that it should be encoded in such a way that it should support streaming compilation, allowing different ‘chunks’ of a module to be compiled on different threads. Chrome and Firefox both have their own streaming compilers - this blog post introduces another one, Lightbeam, written by Parity who are using WebAssembly as a smart contract engine for blockchain.
WebBS is a pretty feature-rich ‘toy’ programming language that compiles to WebAssembly within the browser. If you’re interested in how parsers and compilers work, it’s well worth poking around the source code of this project.
And Finally …
A blog post that briefly dispels three myths about WebAssembly.