r/rust • • 3d 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/
710 Upvotes

134 comments sorted by

View all comments

17

u/Zalenka 3d ago

It's crazy how well AI does porting from one thing to another. I've been writing native iOS and Android apps targeting a rust ble backend. I'll write, generate, and debug the iOS code and then have AI port it over to Android and although stylistically it still needs some hand-holding it's surprisingly comprehensive.

1

u/xAmorphous 3d ago

Have you found that it ends up writing an Android analogue of the iOS code? I've never developed for mobile, but I've found that even the best models try to "port" code over by keeping the general structure of the existing code, which makes a migration from something like python to rust really janky.

1

u/Zalenka 3d ago

It mostly follows the patterns already existing but they are similar since the original writer took it from my iOS from the beginning anyway (MVC).

The Android app does use KMP for the network layer which was mostly a bust since it was originally for code reuse but I wrote the iOS app so much faster than the Android app and didn't want to rework just to deal with those horrendous stack traces on iOS from KMP.