I don't think AI LLM are very good at Rust, no ? I tried multiple times with Sonnet 3.5 last year to produce web interface with Tauri and it got in infinite loops with async functions. On the other hand setting up shaders in Rust worked out of the box. But I couldn't ask too much before the AI was looping over bad code over and over.
Do this in C++ and I'm pretty sure you won't have any issue