WEBASSEMBLY 1.0

by

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

WHAT IS WASM?

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.

WHAT DOES THE FUTURE HOLD? TE INTERNET NATIVE APLICATIONS

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.

WEBASSEMBLY’S NEXT STEPS

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.

#RustWasm2019

Latest articles

AI, MACHINE LEARNING, IOT. MY DAY AT AWS SUMMIT 2023

AI, MACHINE LEARNING, IOT. MY DAY AT AWS SUMMIT 2023

On Thursday, June 22, I was at the Milan Convention Center at the annual event organized by Amazon Web Services to promote its evolving Cloud services: AWS SUMMIT. Amidst so much IoT, Servitization, Cloud Computing above the clouds (in space!), and Supercomputing, one...

TECHNOLOGY AND SUSTAINABILITY: A CONVERSATION WITH ERIC EZECHIELI

TECHNOLOGY AND SUSTAINABILITY: A CONVERSATION WITH ERIC EZECHIELI

Sustainability cannot simply be a word that is tossed around in our daily conversations without meaningful action behind it. Technology has a critical role to play in helping companies achieve their sustainability goals. Recently, we had a lengthy conversation with...

HOSPITALITY 4.0: UP TO SPEED WITH THE DIGITAL TRANSITION

HOSPITALITY 4.0: UP TO SPEED WITH THE DIGITAL TRANSITION

The Hospitality industry is constantly changing and is a crucial component of the global economy. However, the pandemic has presented numerous difficulties for the industry, such as making reservations and sanitizing environments, which have required industry...