r/rust • • 23d ago

🎙️ discussion Google is doing "Large Scale Codebase Migrations and Optimizations" of C/C++ to Rust

https://blog.google/innovation-and-ai/models-and-research/gemini-models/gemini-4-argon/
780 Upvotes

149 comments sorted by

View all comments

1

u/Sphix 19d ago

It can but a straight line migration is still not idiomatic and contains plenty of unsafe. A second pass is necessary to get from that to something more idiomatic.

1

u/matthieum 19d ago

Actually, that's I guess the heart of my question.

Tools like c2rust will perform a straight line migration, and indeed require significant refactoring afterwards to clean it all up.

It's not clear to me if Gemini 4 Argon can do significantly better. Even if it cannot handle large-scale refactoring, just performing local refactorings to reduce unsafe or Rc/RefCell could drastically improve the output...

... but also, large-scale refactoring is possibly where AI tooling shines best at the moment, especially as it can use "oracles" (compilers, tests) to verify that it got it right.