> translate it to Rust catching all the memory bugs in the process
That's not possible. If it were, you'd just fix the memory bugs directly in the original language.
Your best bet is to have a translation littered with unsafe blocks, so you still have to do the work of nailing down the specifics to make them safe. There's no magic "unsafe language" -> "safe Rust" pipeline, even with GenAI.
I imagine it could, eventually, if not now. The Bun translation used Anthropic's best model, cost hundreds of thousands of dollars, and still contained a large number of unsafe blocks. Maybe if they left the agent running for longer, using Miri for verification?
That's not possible. If it were, you'd just fix the memory bugs directly in the original language.
Your best bet is to have a translation littered with unsafe blocks, so you still have to do the work of nailing down the specifics to make them safe. There's no magic "unsafe language" -> "safe Rust" pipeline, even with GenAI.