| name | wasm |
| description | WebAssembly (WASM) integration, WASI, component model, Rust/Go to WASM compilation. Use when implementing WASM modules, browser/edge compute, or polyglot runtime. |
WebAssembly (WASM) — Component Model, WASI
WASM pour performance critique, polyglot runtime, edge computing.
Use Cases
Browser — Crypto, image (Figma, Google Earth)
Edge — Cloudflare Workers, Fastly
Server — Plugins sandboxés (Envoy)
Embedded — IoT, automotive
Compilation
Rust — wasm-pack (~50KB, perf)
Go — GOOS=js GOARCH=wasm (~2MB)
C/C++ — Emscripten (legacy)
AssemblyScript — TypeScript-like
Rust to WASM
use wasm_bindgen::prelude::*;
#[wasm_bindgen] pub fn add(a: i32, b: i32) -> i32 { a + b }
wasm-pack build --target web
import init, { add } from './pkg/wasm.js';
await init(); add(2, 3);
WASI (System Interface)