wasm
Installation
SKILL.md
WebAssembly (WASM)
Overview
WebAssembly is a binary instruction format for a stack-based virtual machine, designed as a portable compile target for languages like Rust, C/C++, and Go. Browsers and WASM runtimes (Wasmtime, Wasmer) run it at near-native speed, which makes it the right tool for CPU-heavy work — image/video processing, codecs, physics, crypto, parsing — that would otherwise be slow in JavaScript. WASM is not a replacement for JavaScript or DOM manipulation; it complements JS for the computational hot path.
Instructions
Rust → WASM (most mature toolchain)
cargo install wasm-pack
rustup target add wasm32-unknown-unknown
// src/lib.rs
use wasm_bindgen::prelude::*;