WebAssembly: several world players work on a faster Internet

Obviously, big players in the Internet industry do all they can to win your loyalty and have you use their own operating system and the associated surrounding ecosystem. This is why it is so exciting to learn that they are now working together on a new script for web browsers that should break down these barriers: WebAssembly.

JavaScript, the key element

Google, Apple, Microsoft and Mozilla have joined forces to allow websites to load faster and achieve better interoperability. The entire Internet is governed by standards that make it possible to display websites – whether they are simple or complex, super interactive and full of rich media – correctly in any browser, on any computer, regardless of the operating system.

webassembly codeJavaScript is currently the glue that allows this interoperability, but the programming language has its limits. Developers have been working for years on solutions to overcome these limits; they build compilers that translate code written in other languages into JavaScript. Examples of these compilers are Microsoft TypeScript and Mozilla’s asm.js project.

Binary code

These efforts now seem to have turned into a joint project: WebAssembly. In short, it boils down to the fact that JavaSript files are simple text files, which are downloaded from the server and then parsed and compiled by the browser’s JavaScript engine. With WebAssembly, binary files are downloaded instead of simple text files. This way, the code can be even more compressed and the JavaScript engine can decode the binary format up to 23 times faster than is the case now.

JavaScript the glue of webassemblyThere should also be a “polyfill library”, allowing WebAssembly code to be translated into JavaScript, so that it can be run in any browser, even if it does not offer native support for WebAssembly.

The idea behind this project is not to replace JavaScipt, but to compile many other programming languages for the Web. It is therefore very likely that JavaScript and WebAssembly will both coexist on the Internet. Some elements of an application will make use of the WebAssembly modules (e.g. for animation, display compression, etc.), while others will still be written in JavaScript, like the user interface.

What you should remember about this evolution is that WebAssembly web apps –apps that are run in the browser, which are by definition platform independent – opens more possibilities. More apps in the browser means better interoperability. And thus less work for the developer who needs to recode his application for various operating systems (iOS, Android, Windows Mobile...). So, this is definitely a positive step forward!

For further information, please visit the WebAssembly page on Git-Hub and check out the interview with Brendan Eich on Medium.com. And if you want to find out more about how WebAssembly works, feel free to visit ModusCreat.