DEV Community

Discussion on: My Mistakes Making a Canvas Based Game with Rust and WebAssembly

Collapse
 
maxgy profile image
Maxwell Anderson

I made a game with Rust and WASM as well, and I had some of the same issues. I naturally just decided to put things like event listeners in JavaScript, but just about everything else worked in pure Rust with little complexity.

Collapse
 
kayis profile image
K

Macros aren't an option?

Collapse
 
maxgy profile image
Maxwell Anderson

I'm not sure about macros in this case, but the usual way to go about adding event listeners straight into Rust is using dynamic clojures.