WebAssembly is now supported in all major browsers. WebAssembly will run in recent versions of FireFox, Google Chrome, Safari, and Microsoft Edge.
WebAssembly (wasm) is intended to solve those problems. WebAssembly is a bytecode that browsers can run with performance only marginally slower than native code. WebAssemby is fast to transmit across the web, fast to load, and fast to run. Today, developers can write applications in languages like C++ and Rust, compile it to WebAssembly, and run it in browsers.
Earlier in 2017, Unity, a hugely popular game engine added experimental support for WebAssembly. If you’re running a recent browser, take a look at Tanks, a Unity demo running on WebAssembly in the browser.
But games are not the only applications that stand to benefit from WebAssembly. As one of the team behind WebAssembly, Luke Wagner, points out in a fascinating article that explores the history of its development, asm.js, WebAssembler’s ancestor, is widely used today:
“Facebook, for example, now uses asm.js to compress users’ images in the browser before upload, saving bandwidth. Adobe compiled a core image-editing library written in C++ to asm.js for the Web version of Lightroom. And Wikipedia uses asm.js to play video formats when the browser doesn’t provide built-in support.”
WebAssembly is useful for compute intensive applications that would once have required native code running on bare metal, rather than transmitted over the web and run in a browser — that used to mean plugins and browser manufacturers are not fond of plugins because they can’t control the experience or the security of plugins (see Flash).
Now that WebAssembly is available in all major browsers, we can expect to see its gradual adoption for games, machine learning applications, computer vision, encryption, compression, and other areas where native computational performance is required.