WebAssembly — New Standard for Powerful and Faster Web Apps
Google, Apple, Microsoft, and Mozilla have joined hands to create code for use in the future web browsers that promises up to 20 times faster performance.

Dubbed WebAssembly (or wasm for short), a project to create a new portable bytecode for the Web that will be more efficient for both desktop as well as mobile web browsers to parse than the complete source code of a Web page or an application.

Bytecode is actually a machine-readable instruction set that is faster for web browsers to load than high-level languages.
Cybersecurity

WebAssembly — A New File Format to Compile Code


At the moment, browsers use JavaScript to interpret the code and allow functionality on websites such as dynamic content and forms. By default, JavaScript files are downloaded from the server and then compiled by the JavaScript engine in the web browser.

However, improvements have been made to load times via Asm.js — the stripped-down JavaScript dialect described as an "assembly language for the web" — but bytecode-based systems such as .NET are faster and enable efficient compilation.

WebAssembly will introduce a new file format that will allow developers to compile their code to a binary notation, which will then be executed inside each browser's (e.g. Chrome, Firefox, IE/Edge, Safari) JavaScript engine.

If introduced as a standard implemented in all web browsers, WebAssembly could surely bring app-like performance to Web content as well as applications.

Over 20% Faster Performance


Preliminary tests already show that the binary representation is 23 times faster to parse than similar JavaScript applications optimized through Mozilla's widely supported asm.js for browsers, and 20 to 30 percent smaller than its actual file size.
"I'm happy to report that we at Mozilla have started working with Chromium, Edge and WebKit engineers on creating a new standard, WebAssembly," said Mozilla developer Luke Wagner, "that defines a portable, size- and load-time-efficient format and execution model specifically designed to serve as a compilation target for the Web."
Currently, only C and C++ code can be compiled into a WebAssembly (a.k.a wasm) file.

Moreover, the developers of wasm know that JavaScript is supported everywhere so for older web browsers, they are providing a polyfill — a JavaScript script that will convert WebAssembly bytecode into asm.js for those browsers that don't support wasm.

WebAssembly is still in its early days of development with no formal standards as of now. The specifications and the high-level design has also not decided yet, but with all four major browser developers working together, wasm should appear soon.

The future possibilities for WebAssembly file format are being explored on GitHub page. However, a new WebAssembly Community Group has already been formed by the World Wide Web Consortium (W3C), which is open for anyone to join. These are FAQs that will give you more details on the group plans.

Found this article interesting? Follow us on Twitter and LinkedIn to read more exclusive content we post.