this post was submitted on 13 Nov 2024
50 points (100.0% liked)

Rust

6128 readers
51 users here now

Welcome to the Rust community! This is a place to discuss about the Rust programming language.

Wormhole

[email protected]

Credits

  • The icon is a modified version of the official rust logo (changing the colors to a gradient and black background)

founded 2 years ago
MODERATORS
top 7 comments
sorted by: hot top controversial new old
[–] [email protected] 11 points 1 month ago (1 children)

with a generous $1M contribution from Google

1M only? Google pays 500M (half a billion Dollar) to their rival Mozilla Firefox. Each year. I don't want to make this a Mozilla thread, just want to say they could have done more than just a million Dollar for Rust. Given that Google uses Rust as well.

[–] [email protected] 14 points 1 month ago (1 children)

The money Google pays to Mozilla has a direct ROI, since more people use their search engine.

Giving money to the Rust foundation only helps Google very indirectly, by being generally benefitial to software companies.

[–] [email protected] 8 points 1 month ago

Google is using Rust more and more in Android, Chromium. So its in Googles direct interest to have a better interoperability between Rust and C++. https://www.theregister.com/2024/03/31/rust_google_c/ and https://www.techradar.com/pro/google-hails-move-to-rust-for-huge-drop-in-memory-vulnerabilities are articles talking why Google likes using Rust.

[–] [email protected] -2 points 1 month ago* (last edited 1 month ago) (1 children)

I bet this won't have an impact on memory safety and interop means C++ compilers have to be stricter about memory layout and reduce unspecified edge cases.

Anti Commercial-AI license

[–] [email protected] 1 points 1 month ago (1 children)

@onlinepersona @snaggen Indirectly it can. Recent studies showed that old code is very unlikely to have security issue. This means that if all new code can be in Rust, while keeping the old code in C++ will be much more secure that rewrite all C++ (because by definition rewrite have more bugs since its new code). So interoperability is both safer and cheaper.

[–] [email protected] 1 points 1 month ago* (last edited 1 month ago) (1 children)

It makes total sense that new C++ will contain a higher percentage of bugs than old C++, but after being an almost full time Rust dev for the last two years, you will not convince me that new Rust code has more bugs than old C++ code.

So far I have yet to come across a bug in any of my Rust code that made it into production. All issue reports from users are still related to the C++ code base that we haven't managed to fully divorce from.

The only advantage to C++ interop is that managers want to see new code get deployed immediately and continuously. They don't want to wait until the corporation's billions (literally) of lines of code are all rewritten in a new language before they start to see the benefits of that transition.

[–] [email protected] 1 points 1 month ago

@5C5C5C I found back the study I was talking about

https://www.theregister.com/2024/09/25/google_rust_safe_code_android/

> The good news for organizations with a lot of unsafe legacy code is that rewriting old code in new languages probably isn't necessary.

> That's not to say old bugs miraculously become unexploitable. Rather, the overall density of vulnerabilities diminishes – a statistical win but not a guarantee of safety.