Skip to content

TetaNES: A Vaccination for Rust—No Needle, Just the Borrow Checker

Photo of Jim Blandy
Hosted By
Jim B.
  TetaNES: A Vaccination for Rust—No Needle, Just the Borrow Checker

Details

Writing an emulator is easy right? Model each component, read game data from a ROM, start an update loop, and execute instructions. Good to go—Except... hardware runs in parallel and has shared state everywhere. Rust has strict ownership rules and a borrow checker. What are we to do?

As far as beginner projects go for learning Rust, an emulator might seem ambitious, but by the time you're done, you'll no longer fear the borrow checker!

Luke Petherbridge will walk through the basics of how to architect an NES emulator in Rust and how to overcome a few of the challenges. He'll dive into some multi threaded code for how to efficiently pump emulated pixels to the screen using the winit and wgpu crates and to your browser using WASM and WebGPU. All without any unsafe code!

Photo of PDXRust group
PDXRust
See more events