WebAssembly - ghdrako/doc_snipets GitHub Wiki

WebAssembly is a low-level language for browsers, giving developers a compilation target for the web besides JavaScript. It makes it possible for website code to run at near-native speed in a safe, sandboxed environment.

WebAssembly is delivered in a binary format, which means that it has both size and load time advantages over JavaScript. Yet it also has a textual representation that is human readable.

By providing near-native performance for CPU-intensive tasks, WebAssembly makes it feasible to move more of these applications to the web.

  • Games
  • Scientific visualization and simulation
  • CAD applications
  • Image/video editing

WebAssembly doesn’t have direct access to the DOM yet.

Existing websites can also benefit from WebAssembly. Figma provides a real-world example, having used WebAssembly to significantly improve their load time. If a website uses code that does a lot of computation, it can make sense to replace only that code with WebAssembly to improve performance.

It was designed to have good support for C and C++, Go added experimental support for it in version 1.11, and Rust is also investing heavily in it.