WebAssembly supported by Mozilla

WebAssembly (.wasm) is a new low-level, assembly-like language that can run in modern web browsers at near-native speeds. It is designed to work alongside JavaScript, and it provides a compilation target for languages like C/C++ so they can run on the web.
 

How does it work?
WebAssembly delivers significant performance gains because its binary format can be parsed and executed an order of magnitude faster than JavaScript. So you can take a code module written in C/C++, compile it into WebAssembly using a tool like Emscripten, and load the generated WebAssembly code into a JavaScript app where it will be safely and efficiently executed by the browser.

WebAssembly Diagram

Why does it matter?
WebAssembly makes it possible to support graphics-heavy games in a browser without plug-ins. It could also be used to port scientific simulation and other compute-intensive applications to the web. It can also have non-web applications like IoT, mobile and JavaScript VMs.

What does it replace or change?

  • It removes the need for browser plug-ins to support online gaming.
  • It works alongside JavaScript, replacing asm.js as the compilation target for C/C++.
  • It allows you to put large applications on the web without rewriting them.

Is it a standard?
WebAssembly is an emerging standard, with ongoing work on the specification. The browser vendors have reached consensus on the design of the initial WebAssembly API and binary format, and there is an active W3C Community Group with members from Mozilla, Microsoft, Google and Apple.

Which products support it?
WebAssembly is currently supported in Firefox and Chrome browsers on Linux, MacOS, Windows and Android. Autodesk will support .wasm and WebGL 2 in its Stingray v1.8 game engine, and experimental support is being added to other game engines and the Rust language.

Get Involved

WebAssembly is an open standard that anyone can use. Visit the community site to find technical documentation, future roadmap and ways to contribute.

Good Reads

Get the scoop from our engineers in these recent articles and blogs.