WebAssembly Tooling
WASM in browsers, on servers, and at the edge.
WebAssembly is real production infrastructure in 2026 — used inside Cloudflare Workers, Shopify Functions, Fastly Compute, Figma, Photoshop Web, and most modern image / crypto libs.
Build TS / JS to WASM
Javy(Shopify) — compiles JS to WASM via QuickJS; used for Shopify Functions.- AssemblyScript — TS-like syntax that compiles to WASM; not actually TS but close.
- Porffor — JS-to-WASM AOT compiler; experimental, watch this space.
Build Rust to WASM
- ★ wasm-pack + wasm-bindgen — the standard pipeline.
- wit-bindgen — WIT (WebAssembly Interface Types) → bindings; for the Component Model.
- trunk — Rust web app builder; handles WASM bundling.
Build Go / C / C++ to WASM
- TinyGo — Go subset that compiles to small WASM binaries.
- Emscripten — C / C++ → WASM; mature.
- GCC
--target=wasm32— direct.
Run WASM outside the browser
- ★ Wasmtime — Bytecode Alliance reference runtime; fast, mature; used by Fastly Compute.
- Wasmer — competitor; package-manager-style WAPM.
- WasmEdge — CNCF runtime focused on edge / cloud.
- Spin (Fermyon) — opinionated WASM-microservice framework.
- Wazero — Go-native WASM runtime; embeddable.
- Cloudflare Workers — V8 isolates that can run WASM modules from Rust / TinyGo / etc.
Component Model & WASI
- ★ WASI Preview 2 — standard ABI for WASM outside the browser; networking, filesystem, sockets all defined.
- ★ Component Model — composable WASM modules; "USB-C for languages."
jco— JS host bindings for the Component Model; embed any WASM component in a Node / Bun / Deno app.wkg— package manager for WASM components.
When to reach for WASM
- CPU-heavy work in the browser — image decoding (
@jsquash/*), video processing (ffmpeg.wasm), 3D physics (Rapier), DB engines (DuckDB-WASM, PGlite, SQL.js), regex (@biomejs/biome's parser). - Sandboxing untrusted code — run customer-provided plugins in WASM (Shopify Functions, Figma plugins).
- Polyglot edge functions — write Rust / Go / Python and run on Workers / Compute / Spin.
- Offline desktop / mobile apps — Tauri can ship WASM modules.
Browser-specific things you can do with WASM
- Image / video codecs — WebP, AVIF, HEIC, JXL, AV1 via WASM ports.
- Local DBs — PGlite (Postgres), DuckDB-WASM, SQL.js, Wa-SQLite.
- CRDTs — Loro, Automerge, Yjs (parts).
- AI inference — ONNX Runtime Web, Transformers.js (with WebGPU + WASM fallback).
- PDF rendering — pdfium WASM ports.
Don't use WASM for
- DOM manipulation — overhead crossing the JS↔WASM boundary erases the gains.
- Tiny utility functions — JIT-ed JS is plenty fast.
- "I read a blog about it once and want to try" — pick a real bottleneck first.
Pick this if…
- Default Rust → browser: wasm-pack + wasm-bindgen.
- Default Go → browser: TinyGo.
- Embed a WASM component in a Node app:
jco. - Run customer plugins safely: WASI + Wasmtime; or Workers + WASM.
- Edge microservices in any language: Spin or Cloudflare Workers + WASM.
- You're not sure if you need WASM: you don't.