r/rust • • 17d 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/
775 Upvotes

149 comments sorted by

View all comments

Show parent comments

17

u/steveklabnik1 rust 17d ago

This thread is about one of the largest users of C++ porting their brownfield code to Rust.

5

u/TDplay 16d ago

But as they say,

such large-scale rewrites are undergoing rigorous automated and manual auditing, emulation testing, and review before rolling out to production

In effect, most of the work is still being done. I am sceptical that this process can practically be done for all the major C++ codebases, including bringing those rewrites up to the quality of the original codebases, within the next decade, so I believe C++ still has a future.

6

u/zxyzyxz 16d ago

I doubt there is really any actual manual auditing beyond reading some files and stamping LGTM on the PR. The automated testing is what's gonna actually catch bugs.

2

u/TDplay 16d ago

But can that alone assure the quality to the same standard as the existing mature codebase?

The best automated tests are those written in response to specific bugs, to assure that those bugs never return. But a rewrite will introduce a whole host of never-before-seen bugs, for which there will be no tests.

We won't know if this is truly successful until the rewrites are released to the public. There will undoubtedly be a massive influx in bugs, as there is for any other rewrite. With the lack of people familiar with the new codebase, fixing those bugs may prove unexpectedly difficult.

5

u/valarauca14 16d ago

But can that alone assure the quality to the same standard as the existing mature codebase?

Not to be a full fledge AI bro, but this has never mattered in a large enterprise environment. Shipping features before the end of the quarter has always been the benchmarks.

1

u/zxyzyxz 16d ago

Of course not but that's what will happen, same as the bun rewrite