Technology Spotlight: WebAssembly

by | Apr 22, 2019

 What is it?

 

WebAssembly is a new type of code that can be run in modern web browsers — it is a low-level assembly-like language with a compact binary format that runs with near-native performance and provides languages such as C/C++ and Rust with a compilation target so that they can run on the web. It is also designed to run alongside JavaScript, allowing both to work together.

https://developer.mozilla.org/enUS/docs/WebAssembly

What’s that mean?

 

You can compile C/C++ or Rust code into WebAssembly format and it can run inside of modern web browsers. It is built to work well with Javascript so that you can seamlessly weave functionality between Javascript and a C++ library.

 

Any other features?

 

WebAssembly has been developed with major processing loads in mind. Things like games and graphics applications for the browser. The goal is speed and size. It compiles into binary files, so it ships small and is claimed to run at near-native speeds.

 

Who’s behind it?

 

WebAssembly is actively being developed by the community. There is a W3C WebAssembly Community Group that uses a GitHub Organization to stay connected and work together. All work is done in the GitHub organization out in the open for the world to see and participate in. Additionally, there is a W3C WebAssembly Working Group that maintains standards and is made up of contributors from major organizations like Mozilla, Facebook, Microsoft, as well as independent industry experts.

 

What’s its current state?

 

WebAssembly CG members representing four browsers, Chrome, Edge, Firefox, and WebKit, have reached consensus that the design of the initial (MVP) WebAssembly API and binary format is complete to the extent that no further design work is possible without implementation experience and significant usage. This marks the end of the Browser Preview and signals that browsers can begin shipping WebAssembly on-by-default. From this point forward, future features will be designed to ensure backwards compatibility.

https://webassembly.org/roadmap/

Summary

 

WebAssembly may turn out to be a groundbreaking addition to the web development world. It’s got the support of the right communities and is currently stable and fully supported, so the future is bright. It’s not going to be the tool you use for everything, but when used correctly, it can be a powerful enhancement to your web application.

 

Additional Resources