Gate Demo in WebAssembly

January 17, 2018

Rust added a new compiler target a couple of months ago: wasm32-unknown-unknown. This allows Rust code to be compiled to WebAssembly and run in a web browser. Since I had recently completed my Gate Demo game, I thought it would be neat if I could use this target to play the game in a browser. It took some refactoring of Gate, but I got it working, and you can play it here. Despite needing to update the Gate library, I didn't need to update the core game logic at all.