WebAssembly is now the fourth web standard language
W3C creates technical standards and infrastructure guidelines for the Web, under a dedicated vision of ‘One Web’. Their mission under the WebAssembly Working Group is to “standardize a size- and load-time-efficient format and execution environment, allowing compilation to the web with consistent behavior across a variety of implementations”.
According to Philippe Le Hégaret, W3C Project Lead: “The arrival of WebAssembly expands the range of applications that can be achieved by simply using Open Web Platform technologies. In a world where machine learning and Artificial Intelligence become more and more common, it is important to enable high performance applications on the Web, without compromising the safety of the users.”
What is WebAssembly?
WebAssembly (often abbreviated as Wasm) is “a binary instruction format for a stack-based virtual machine” and is a portable target for compilation of languages such as C, C++, and Rust. It runs on a large number of platforms and is part of the open web platform with versionless backward-compatibility.
While it has other purposes and a scope beside the Web, running on the web is one of the Wasm platform’s largest purpose. Inside of the browser, its common use cases include image and video editing, execution for languages and toolkits, P2P applications, remote desktops, video augmentation, and more.
According to W3C:
At its core, WebAssembly is a virtual instruction set architecture that enables high-performance applications on the Web, and can be employed in many other environments. There are multiple implementations of WebAssembly, including browsers and stand-alone systems. WebAssembly can be used for applications like video and audio codecs, graphics and 3D, multi-media and games, cryptographic computations or portable language implementations.
Its high-level goals describe the scope of its vision and is a good place to get started to see what it’s all about.
Improving web performance
W3C recommends WebAssembly for speedier response time, faster loading, and efficient code. According to their press release, Wasm enhances both web performance and power consumption. It allows for code written in multiple languages to run natively at near-native speeds.
The W3C press release states:
WebAssembly improves Web performance and power consumption by being a virtual machine and execution environment enabling loaded pages to run as native compiled code. In other words, WebAssembly enables near-native performance, optimized load time, and perhaps most importantly, a compilation target for existing code bases.
A new web?
Future versions of Wasm are already well on their way. The future roadmap including the addition of threading, fixed-width SIMD, reference types, tail calls, and ECMA Script module integration. Additional future releases will improve Wasm’s usability and availability.