Is using Rust to strucute my html game a good option?

Im creating a simple html canvas game with JS. With Wasm, I want to create the structure for it in Rust. So I need to have structures for the player, enemies etc. Im thinking of creating a sort of ECS in Rust.

Does that make sense? :sweat_smile: Or is it better to just do it in JS? I do like the you can setup structures etc in Rust.

I suspect the long route is something like this:

  1. start building it in JS

  2. at some point, run into an error where something you are 100% certain should have a value turns out to be null / undefined

  3. spend hours tracking down the error

  4. after finding the error, realize that a static type system would have caught the error for you ages ago

  5. switch to Rust :slight_smile:

1 Like

This topic was automatically closed 90 days after the last reply. We invite you to open a new topic if you have further questions or comments.