The author reflects on their Rust rewrite project, highlighting what worked well and what didn’t. They found the incremental rewrite approach successful, leading to simpler code and performance improvements. However, they faced challenges with Undefined Behavior due to raw pointers and unsafe blocks, as well as issues with Miri and Valgrind. Memory leaks, cross-compilation, cbindgen, unstable ABI, and lack of support for custom memory allocators were also problematic. The complexity of using Rust with heavy C interop was noted, with the author suggesting that Rust might not be the best choice for such projects, recommending pure Rust for beginners instead. The author expresses a mix of satisfaction and disappointment with the Rust rewrite experience, hinting at the possibility of considering Zig for future projects.
https://gaultier.github.io/blog/lessons_learned_from_a_successful_rust_rewrite.html