About this project

I decided to work on this project to get a feel for two technologies that I have been interested in: Rust and WebAssembly.


The CHIP-8 emulator seemed to be a common suggestion for a first project in Rust, and it definitely helped me become comfortable writing Rust code and confident enough to start a more complex project.


Technologies


Because the focus was on Rust and WASM, everything else is quite barebones, with just vanilla JS handling the client side. I used Bulma to speed up the styling.


The emulator is written in Rust, and the software mimicks the CHIP-8 hardware where possible. The CPU is a Rust struct which is imported into JS, and methods are called in JS. To avoid copying the contents of the CHIP-8 memory, the methods return pointers to WebAssembly's linear memory which the JS can read directly.