Reference

WASM (WebAssembly)

WASM (WebAssembly) is a compact binary instruction format that runs in web browsers at near-native speed. A .wasm file is compiled code — often from C, C++, or Rust — that the browser executes alongside JavaScript.

Files & formatsGeneral

WASM (WebAssembly)

Also known as: .wasm file, WebAssembly, Wasm binary

WASM (WebAssembly) is a compact binary instruction format that runs in web browsers at near-native speed. A .wasm file is compiled code — often from C, C++, or Rust — that the browser executes alongside JavaScript.

  • Binary code format that runs fast in browsers
  • Compiled from C, C++, Rust, and other languages
  • Works alongside JavaScript, not as a replacement

What WebAssembly is for

WebAssembly lets demanding code run in the browser fast. Developers compile languages like C++, Rust, or Go into a .wasm binary, which the browser loads and runs much closer to native speed than JavaScript could.

It powers in-browser games, video and image editors, CAD tools, and other compute-heavy apps. WASM does not replace JavaScript; the two work together, with JavaScript wiring the page and WASM doing the heavy lifting.

Files and the browser

A .wasm is a binary module, not human-readable, though it has a text representation (WAT) for debugging. Browsers download and cache it like other web resources, so it can sit in the browser cache.

Module size depends on the program compiled into it. As a downloaded resource, a cached .wasm is cleared when you clear browsing data.

Related terms

Keep reading the reference.