by Marco Gazzuolo

After many months of development, version 1.0 of WebAssembly (wasm for friends), is here.


WebAssembly is the standard W3C that carries out machine code in a binary format inside the browser. It is designed to work in perfect symbiosis with javascript. It also provides the browser with new makings and new domains to discover.
 It all started with Emscripten which allowed C++ coding inside the browser although the code created was still quite slow compared to the native code.

Mozilla’s engineers thus created asm.js to carry out javascript in an optimal way. They understood that, to make it even better, another language was needed: WebAssembly.

Wasm gives a massive boost to web performances: it creates a multi-platform code which can easily compete on how the native code performs.

WebAssembly can be defined as a compilation target as its developers write code in any given language which is then translated into WebAssembly byte-code.

It now works on browsers but, in a near future, it could easily work on mobile operating systems such as ChromeOs and WebOs on top of servers and desktop apps.
Another future development could be in the 3D app domain since GPU is used and there is a need for high level features.

WebAssembly could have a really bright future in the following domains:

  • high performance and pre-existing code, to be added to a web app
  • high performance code to write every time javascript features are not sufficient
  • the porting of desktop apps on the web, such as Autocad and 3D Unity (only to quote a few), already use Webassembly for their web-based products.

Languages that can be written in WebAssembly are Rust, C/C++, Kotlin/Native, Go and D.
 There are some third party tools that allow .Net and Java to write on bytecode and wasm.
 For languages such as Python and Ruby there are written interpreters in WebAssembly which help the correct functionality.

Rust is the language that has the best support as it is a Mozilla product.

The latest WebAssembly features can be tested using Firefox Developer Edition.


WebAssembly and other technologies such as WebWorkers, IndexDB and new protocols such as HTTP/2 and QUIC allow us to start traveling through unexplored areas: the Internet Native Applications.
 These are web applications with the same performance of native apps: you basically get the best out of each side.

Webassembly has been created to work together with javascript and not to replace it. It really allows the improvement of the chinks in its armour.
 Brendan Eich, the inventor of javascript, sees WebAssembly as a massive revolution. It’s one of the most interesting developments the web has seen in recent years.

The website “Can I use” explains that, since March 2018, 72.75% of global browsers have been supporting WebAssembly.


Mozilla, which is actively involved in its development, mentioned the following evolution of WebAssembly:

  • Multithreading (to best take advantage of multi-core processors)
  • Simd (a technique to process data simultaneously by dividing them into sections and then execute the same function from different processes at the same time. It is a very similar concept to map/reduce)
  • 64-bit wasm
  • Streaming compilation (immediate code compilation whilst we are still downloading it)
  • Tiered compilation (a second code compilation once the whole code has been downloaded — very performant but very slow.)
  • Implicit HTTP caching
  • Js and wasm fast interaction
  • Fast data exchange between js and wasm
  • ES modules integration (to import new wasm modules as if they were js)

WebAssembly clearly is a promising technology which opens new unimaginable scenarios. It will transform how web and apps are developed. We are currently evaluating it here at Interlogica with great attention for the next challenges.


Originally published at www.interlogica.it on December 4, 2018.