In this article I will try to answer the most common questions about WebAssembly.

If you prefer the video format, a podcast is available here.

Original illustration unavailable

What is WebAssembly?

WebAssembly is a binary code standard that is understandable by modern browsers.

The pointy ones won't talk about byte code but dASTAST (Abstract Syntaxt Tree) but that's another debate.

So WebAssembly is a new language?

No, it's a binary format like the assembler.

It was designed to be used with high-level languages like C/C++/Rust, C# to design web applications.

For example, for C# instead of producing IL it could create a binary WebAssembly.

Do we need to generate a binary for every x86, x64 and ARM platform?

No, binary is platform-independent: there will be no specific compilation for ARM/x32/x64.

Is this a company that creates WebAssembly?

No, it's the same consortium as HTML: the W3C.

What makes this initiative very interesting is that neither Adobe nor Microsoft are trying to impose a new binary format.

Original illustration unavailable

Which browser supports this?

WebAssembly is supported by the four main browsers: Edge, Chrome, Firefox and WebKit.

And it's been that way since late 2017.

Original illustration unavailable

What are the advantages of WebAssembly over JavaScript?

The WebAssembly binary is already compiled when it reaches the browser:

Its parsing is very easy: according to recent experiments it would be 20 times faster than a JavaScript file

This is not a text file so it will be « minus big

It is therefore faster to load and faster to execute.

It is also faster to perform calculations: it will therefore be more suitable for compression, image manipulation, video games...

Is WebAssembly safe?

WebAssembly is in a secure sandbox running environment.It inherits the same security strategies as JavaScript.

Is WebAssembly going to replace JavaScript?

Original illustration unavailable

WebAssembly is not intended to replace JavaScript. It is designed to complement JavaScript with superior performance. It is an alternative to building web applications or 2D/3D games, for which it is more optimized.

Can WebAssembly communicate with JavaScript?

Yes, I did. WebAssembly JavaScript Interface, which provides an explicit JavaScript API to interact with WebAssembly.

Is WebAssembly the new Flash / Silverlight / JavaFX?

WebAssembly has some similarity to these engines.

But unlike his elders:

  • There is not a single big company trying to set its own standard.
  • It's not a plugin to add to the browser, the engine is already integrated and functional in the web browser

Original illustration unavailable

What tools can generate WebAssembly binaries?

In dotnet 3 tools allow to generate WebAssembly:

Unity3D : 2D and 3D video game engine

Blazor The ASP.NET team has brought the Razor view engine into WebAssembly.

Uno Platform: UWP everywhere: nventive allowed the UWP code to run on iOS/Android but also WebAssembly.

These three tools are still in beta on WebAssembly byte code generation, so we're going to have to wait a little longer before we start migrating our web applications to this new format.

Happy coding

To go further: