Out of the JavaScript Box: Front-End Rust Programming
summary
Rust compiles to WebAssembly to replace heavy JS work: a Tetris implemented as 460 lines of Rust produces a ~22KB .wasm binary, reduced to 19KB after wasm-opt, with only 65 lines of JavaScript as glue. Build uses wasm-pack, wasm-bindgen and cargo; webpack can bundle the result. WebAssembly runs without GC in its own linear memory, so the app minimizes copies (one memcpy per frame at 60fps), imports Math.random from JS, and trades predictable performance for explicit memory and interface design.
AI-written summary · about
chapters (28)
- 0:00Intro
- 1:07Tetris
- 1:27WebAssembly
- 2:16W3C
- 3:24Why not use JavaScript
- 4:05JavaScript is a compilation target
- 4:42JavaScript is a bad assembly language
- 5:43JavaScript is unpredictable
- 8:00Performance JavaScript
- 8:20Nojs
- 9:44AwesomeJS
- 10:34JavaScript
- 11:19JavaScript Problems
- 15:52WebAssembly vs JavaScript
- 16:59WebAssembly Documentation
- 17:21WebAssembly Changes
- 17:47Event Handler
- 18:08JavaScript Event Loop
- 20:47Memory Management
- 21:46Rust
- 22:26Rust Description
- 24:15Package Manager
- 29:00JavaScript File
- 29:12WebAssembly API
- 31:38Summary
- 38:23Tools
- 39:06Twiggy
- 40:18Questions
related talks
30mImproving web app with Rust and WASM
41mLet's build with WebAssembly!
33mWebpack + WebAssembly the future
43mDo things blazingly fast with WebAssembly
43mWhy you should consider Web Assembly in your next frontend project
25mThink About Front-end Web Development with Rust
47mRewrite the web with Rust and Web Assembly
30mRust in the Browser for Javascripters:New Frontiers,New Possibilities
