1. React
  2. ReactiveConf
  3. 2019
  4. “Breaking Out of Box” or Writing a Wasm-based Gameboy Emulator in Rust for Frontend-Developers

“Breaking Out of Box” or Writing a Wasm-based Gameboy Emulator in Rust for Frontend-Developers

Yuki Li at ReactiveConf 2019

“Breaking Out of Box” or Writing a Wasm-based Gameboy Emulator in Rust for Frontend-Developers Everyone wants to put us in a box, but today we’re going to break out – no webpack, no v8, none of the dizzying 1,000 levels of magic and abstraction that we alternatively enjoy and wrestle with day to day. Instead, we’ll take a journey to simpler times with a gameboy emulator, where every line of code we write maps to an exact cycle count on a known CPU. We’ll simultaneously learn about this newfangled language called “Rust,” and how it allows us to express the low-level designs of this ancient CPU while sussing out high-level, zero-cost abstractions for our modern code. We’ll compile a web-assembly (“wasm”) binary to run in the browser to explore interop between Rust, wasm, and JavaScript, and see what a full toolchain looks like. Finally, our journey near its end, we’ll reflect on why we would care about stories about low-level CPU programming; what we lose and gain from JavaScript’s wonderful abstractions, and most importantly, what it all means to us as engineers.