Learn WebAssembly toolchain vocabulary: Emscripten, wasm-pack, WASI, the component model, WebAssembly text format (WAT), and the wasm binary format.
0 / 5 completed
1 / 5
Emscripten is a toolchain that compiles C/C++ to WebAssembly. What does it provide beyond the .wasm binary?
Emscripten uses LLVM to compile C/C++ → .wasm and also generates a .js file that bootstraps the module, emulates POSIX APIs (file system, sockets via WebSockets), and wires up stdin/stdout. Projects like OpenCV, SQLite, and game engines have been ported to the browser using Emscripten.
2 / 5
WASI (WebAssembly System Interface) is designed to:
WASI gives WebAssembly a POSIX-like interface (file I/O, sockets, environment variables) through a capability model — a module only gets access to system resources explicitly granted to it. This enables the 'write once, run anywhere, sandboxed' vision for server-side Wasm (used in Fastly Compute, Wasmtime, Wasmer).
3 / 5
The WebAssembly text format (WAT) is:
WAT uses S-expressions: (module (func $add (param i32 i32) (result i32) (i32.add (local.get 0) (local.get 1)))). Browsers and tools like wabt (WebAssembly Binary Toolkit) can convert between WAT and the binary .wasm format. It is invaluable for understanding what a compiler emits or for writing performance-critical micro-modules by hand.
4 / 5
wasm-pack is a tool used in the Rust/WebAssembly ecosystem to:
wasm-pack orchestrates: cargo build --target wasm32-unknown-unknown, runs wasm-bindgen to generate JS/TS bindings, optimises the .wasm with wasm-opt, and bundles everything into an npm-ready package. It enables Rust libraries (e.g., image processing, cryptography) to be consumed seamlessly from JavaScript.
5 / 5
The WebAssembly Component Model addresses what limitation of core WebAssembly modules?
Core Wasm modules share only numeric types (i32, i64, f32, f64) with the host — passing strings requires manual memory management. The Component Model defines WIT (WebAssembly Interface Types), a higher-level IDL for describing component interfaces with rich types. Components can be composed, linked, and reused across languages without shared memory.