Guide to WebAssembly

What is WebAssembly?

WebAssembly (Wasm) is a low‑level binary format that runs in modern browsers at near‑native speed. It allows developers to compile languages like C, C++, Rust, and Go to run on the web alongside JavaScript.

Why Use WebAssembly?

Running Your First Wasm Module

Below is a minimal add function written in WebAssembly Text format, compiled to binary, and executed in the browser.

(module
  (func $add (param $a i32) (param $b i32) (result i32)
    local.get $a
    local.get $b
    i32.add)
  (export "add" (func $add)))