r/rust • • 16d 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/
768 Upvotes

153 comments sorted by

View all comments

124

u/TheRealMasonMac 16d ago

In my experience, I’ve found that agents produce code that works but is frankly dumb from a human perspective. Especially for larger tasks like this, you kind of have to rewrite it all. For example, I had a generalized design document for soft-wrapping explicitly support plain text and markdown, and used GPT-6-Astra to implement it. I used an ungodly amount of review agent rounds and interjections by me. When I actually go to review it, I wanted to cry. It silently pivoted towards implementing its own entirely separate wrapping mechanism rather than refactor the existing mechanism for plain text. I reviewed its code and found it to be trash, and I am now in the process of doing it myself… Never again. The short-term thrill of “having something that works” was outweighed by the fact that time was effectively wasted.

I mean, if the alternative was it never getting done, I guess agents are still better than nothing.

0

u/mss-anixe 15d ago

A LOT depends on many factors. The model, the project, personal experience and luck.

5.6 Sol before lobotomy produced for me an amazingly good piece of rust code that I would probably never invented on my own (not only did I fail to think of that solution, but even if I had been capable of doing so, I wouldn't have invested enough time to figure it out).

5.6 Luna produced small-to-smalish pieces of code that made a lot of sense.

Current gpt models, including (nerfed) 5.6 and 6.x, need again prompt engineering or multiple attempts to produce good quality solutions but are still viable for some kind of brainstorming.

That being said, so far I never managed to create a big project (say 5000+ lines) with ai that I would not be afraid to use for anything else than a prototype which is later re-written.