Sunday, July 23, 2023

Rust Mars

I am currently working on converting to the Rust programming language yet another Java applet that I originally wrote a couple of decades ago.  Mars is a tank combat game which provides a demonstration of the use of my Rust-based implementation of the A* algorithm.  Although you cannot control one of the tanks yet, you can toggle on options to visualize how each tank is using the A* algorithm for pathfinding.

I was struggling with a memory leak in Mars until a member of the Dallas Rust Meetup mentioned that the wee_alloc dependency that I was using for memory allocation with WebAssembly (Wasm) was known to have this issue.  I removed wee_alloc and the problem immediately disappeared.  I have since updated my Rust-webpack Project Setup tutorial to no longer include wee_alloc in the setup instructions.


No comments: