Must Know
The hardest mistakes in WebAssembly AI are usually category errors: treating a format as a runtime, a runtime as a backend, a sandbox as a complete security policy, or one successful browser as universal support.
Core distinctions
| Pair | Distinction |
|---|---|
| Wasm vs WebGPU | Wasm executes portable code, normally on CPU; WebGPU submits explicit GPU work. |
| WebNN vs WebGPU | WebNN describes neural operations for an implementation-selected device; WebGPU exposes lower-level buffers, shaders, and dispatch. |
| WebNN vs WASI-NN | WebNN is a browser API; WASI-NN is a WASI host proposal for non-browser component/module environments. |
| Model format vs runtime | ONNX, TFLite, safetensors, and GGUF encode artifacts; a runtime must support their operators and metadata. |
| Runtime vs backend | The runtime owns sessions and tensors; the backend or execution provider performs operations on CPU, GPU, or NPU. |
| Local vs offline | Local inference avoids a remote compute call; offline additionally requires cached application, model, metadata, and storage behavior. |
| Local vs private | Local execution can improve privacy, but logs, analytics, model downloads, and browser extensions can still transmit data. |
| Sandbox vs policy | Wasm constrains guest execution; the host still decides capabilities, limits, secrets, network, storage, and updates. |
| Quantized vs equivalent | Quantization reduces representation precision; task and numerical differences must be measured. |
| Fallback vs failure | A fallback can preserve function, but it changes backend, performance, or quality and must be reported. |
Minimum vocabulary
- A module is validated core Wasm code; an instance is a module connected to imports, memories, tables, and state.
- Linear memory is a byte-addressed guest memory, not a JavaScript object graph or GPU buffer.
- An ABI defines how values cross a binary boundary; WIT and the Canonical ABI extend that contract for components.
- A tensor combines element type, shape, strides, layout, and storage; matching dimensions alone does not prove matching semantics.
- An operator is a graph operation; unsupported operators can block export or force fallback.
- An execution provider, backend, or delegate maps work to a concrete implementation and device.
- A golden output is a versioned reference result paired with input, model, preprocessing, and tolerance.
- Cold start, first inference, and warm inference measure different product costs.
Evidence rules
- Record browser, operating system, hardware, runtime, backend, model, quantization, and date.
- Never claim a performance improvement without workload, warm-up, samples, distribution, and raw context.
- Never claim numerical equivalence without an explicit comparison and tolerance.
- Never hide which backend ran or whether a fallback occurred.
- Mark standards, drafts, proposals, experiments, and implementation-specific APIs distinctly.
- Treat model and Wasm binaries as versioned supply-chain artifacts with checksums.
- Keep deterministic computation outside the model whenever correctness can be expressed in code.
Continue
Open Phase 00: Orientation to establish prerequisites and scope, then begin with WebAssembly Execution Model. Keep Always Active attached to every phase.