Hand-crafting WebAssembly
summary
Shows how to write WAT (WebAssembly Text-format) by hand, compile with wat-to-wasm and wrap with what.js, and converts real algorithms—distance, vector diff, crypto primitives—into explicit memory and instruction sequences. Claims hand-written WASM runs often under an order of magnitude slower than C, reports typical JS→WASM wins of about 20–30%, explains 32-bit linear memory (65 KB pages) and explicit type conversions, and demonstrates Sodium Universal production code (thousands of lines, ~2,000 downloads/week) plus a macro pre-parser that makes dense WASM manageable.
AI-written summary · about
chapters (8)
- 0:00Start
- 8:30Modules are the basic unit
- 15:10Distance between points
- 18:36Distance between vectors arrays
- 18:51Linear memory and array input
- 23:19Loading bytes
- 24:17Loops and Branching
- 26:23Sneak peek








