Chrome, Firefox, Safari And Edge Supporting WebAssembly: Making It The Web's Standard

Both Apple and Microsoft have shipped new versions of Safari and Edge, respectively, that include support for WebAssembly.

Since both Mozilla Firefox and Google Chrome already support WebAssembly, this makes all four major browsers capable of running code compiled to the wasm format on the web that works with JavaScript to run web applications at near-native speeds..

"Google, Apple, and Microsoft had all committed to supporting WebAssembly in their browsers. To have that support in market today is a really exciting development," said Luke Wagner, a Mozilla engineer who created WebAssembly’s precursor, asm.js, and spearheaded work on the WebAssembly specification.

What this means, web developers are having a broader client support, enabling them to experiment with WebAssembly with assurance that most end users will be able to run swasm modules by default.

Since WebAssembly is a pure subset of JavaScript, asm.js can run in any browser without modification.

Apple and Microsoft have joined the crowd when Mozilla was preparing to launch Firefox Quantum.

Becoming The Web's Standard

WebAssembly, or simply just wasm, is a portable, size- and load-time-efficient format suitable for compilation to the web.

With a low-level bytecode format for in-browser client-side scripting, WebAssembly evolved from JavaScript. Its initial aim is to support compilation from C and C++, although other source languages such as Rust are also supported.

And with Google, Firefox, Apple and Microsoft supporting WebAssembly, the format is becoming an industry standard, proven to run large and complex applications on the web. Some advantages include:

  • Transmitting files quickly, and load them as JavaScript modules.
  • Get near-native performance without using a plugin.
  • Write code that is both fast and safe, because it executes within the browser’s security sandbox.
  • Have a choice of languages besides JavaScript.

The web found WebAssembly interesting because it brings predictable performance to the web platform. This is something relatively more difficult to achieve using JavaScript alone.

Gaming companies, were early adopters of WebAssembly and asm.js. Popular games like Candy Crush Saga, Top Eleven, and Cloud Raiders had used asm.js on Facebook. Epic and Unity were the first to put their game engines on the web without rewriting the C++ code bases in JavaScript.

As it matures and increased in popularity, the use cases for WebAssembly and asm.js have grown beyond just online gaming.

They are included into things like: computer vision, 3D mapping, user-interface design, language detection, audio mixing, video codec support, encryption, compression and more.

"Asm.js and WebAssembly were really no-brainers for the gaming industry, because they had all this investment in massive C++ programs that they didn’t want to rewrite for the web," continued Wagner. "Now we’re seeing people using WebAssembly for all kinds of new projects. So there’s this real promise that we will someday be able to run most any application on the web and have it perform just as it would if it were running locally on your PC."

Published: 
20/11/2017