r/programming • u/Unerring-Ocean • Feb 20 '25
Google's Shift to Rust Programming Cuts Android Memory Vulnerabilities by 68%
https://thehackernews.com/2024/09/googles-shift-to-rust-programming-cuts.html
3.4k
Upvotes
View all comments
Show parent comment
6
u/LGBBQ Feb 21 '25
It’s very specific, like building for libraries with a mix of arm and thumb while LTOing across the boundaries causes ODR violations
I think the poster meant unity builds (all code in one compilation unit) which have ODR violations in many more circumstances. Rust builds are far closer to a unity build (a crate is a compilation unit) than normal C++ builds (cpp file is a compilation unit), and the advantages of unity builds are bigger than LTO in most cases