WebAssembly is a binary instruction format for a stack-based virtual machine, designed as a portable compilation target for high-level languages like C/C++, Rust, Go, Java, and Kotlin. Standardized as WebAssembly 3.0 by the W3C in September 2025, it runs at near-native performance in a sandboxed environment and supports a rich feature set including garbage collection, exception handling, 64-bit memory, SIMD, and threading. Unlike JavaScript, core Wasm is statically typed with numeric, vector, and reference types, enabling predictable performance ideal for compute-intensive workloads like gaming, video processing, scientific computing, and server-side edge functions. The key insight: Wasm isn't meant to replace JavaScript—it complements it, handling performance-critical code while JS manages the DOM and user interactions.
What This Cheat Sheet Covers
This topic spans 29 focused tables and 293 indexed concepts. Below is a complete table-by-table outline of this topic, spanning foundational concepts through advanced details.
Table 1: Core Value Types
Wasm's static type system starts here, and it's deliberately small: a handful of numeric and vector types for raw computation, plus the reference types that let Wasm hold pointers to functions, host values, and—since WasmGC—managed structs and arrays. Notice that integers carry no inherent sign; whether a value is treated as signed or unsigned is decided by the instruction, not the type.
| Type | Example | Description |
|---|---|---|
(i32.const 42) | • 32-bit integer • not inherently signed or unsigned—interpretation determined by operation. | |
(i64.const 9223372036854775807) | • 64-bit integer • used for large numbers, memory addresses in Memory64 proposal. | |
(f32.const 3.14) | 32-bit floating-point number following IEEE 754 standard. | |
(f64.const 2.718281828) | • 64-bit floating-point number following IEEE 754 • default for most floating operations. | |
(v128.const i32x4 1 2 3 4) | • 128-bit vector for SIMD operations • holds multiple values processed in parallel. | |
(table 10 funcref) | • Nullable reference to any function • shorthand for (ref null func). |