What is WebAssembly?
What will it be used for?
WebAssembly was first demonstrated using Angry Bots, a game developed using the Unity engine. However, Unity much like Unreal already supported compilation to asm.js which allowed execution on browsers. Why do we need a format for executable code which is less legible to humans?
The answer is that being an assembly level language it is faster and more efficient in terms of performance. High-level languages have to go through a number of interpreters, libraries and other software which make the code understandable to the machine. WebAssembly is much more native or closer to machine code than asm.js while being way more legible than a traditional assembly level language. In a textual format, it is legible enough to be debugged and optimised. It allows the developer to access the building blocks of the system.
Where do we go now?
WebAssembly is gradually gaining support across different browsers. Mozilla has announced that it will support WA in all major browsers. It is enabled by default in Chrome and Edge 16. Even though the primary objective was to support development using C and C++, web development using languages like Rust is also gaining steam. There are talks of WebAssembly supporting more data handling features in the future which will allow languages like Java and C# to be compiled to WA. Not only does WebAssembly increase support for old-school languages, it also presents the prospect of new languages which compile to WebAssembly. Developers can make their own languages to suit their specific needs.
The only way for WebAssembly to go is upwards, as the possibilities are endless. The next time you play a game on your browser at an unprecedented framerate or realise how convenient editing videos on your browser is, you know what you have to thank.
Written by Soumik Majumder for IECSE,
Edited by Janice Coutinho for MTTN.