4 ms·
At this point I feel like it's no longer an uphill climb to get Rust into foundational, mission-critical code adoption. The benefits are so obvious. Maybe it'
by petcat 1y ago
At this point I feel like it's no longer an uphill climb to get Rust into foundational, mission-critical code adoption. The benefits are so obvious. Maybe it's just a lingering religious war?
In any case, I'm glad we're seeing more and more evidence and case-studies of why "rewrite it in Rust" isn't just a meme.
- vbarrielle 1y agoBut the approach here is "write new code in rust", not rewrite.
- gpm 1y agoEh, I don't think it's actually one or the other. Google has taken on rewriting some more problematic components in rust. See for example: Binder kernel driver: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=eafedbc7c050c44744fbdf80bdf3315e860b7513 https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/lin... Media codecs: https://www.androidauthority.com/android-16-in-process-software-audio-codecs-3541408/ https://www.androidauthority.com/android-16-in-process-softw...
- GeekyBear 1y agoThis is also happening at Microsoft: > Rewriting SymCrypt in Rust to modernize Microsoft’s cryptographic library https://www.microsoft.com/en-us/research/blog/rewriting-symcrypt-in-rust-to-modernize-microsofts-cryptographic-library/ https://www.microsoft.com/en-us/research/blog/rewriting-symc...
- nicoburns 1y agoYeah, there's also a freetype replacement https://github.com/googlefonts/fontations https://github.com/googlefonts/fontations I think they're trying to avoid rewriting things for no reason though. The things being rewritten tend to have a history of security problems or other issues that would be cause for a rewrite even if it wasn't in Rust.
- VWWHFSfQ 1y agoSure, but at a macro level the approach is still to "rewrite" Android subsystems in Rust. Just slowly.
- wiseowise 1y agoGoogle rewrote Android's Bluetooth stack in Rust.
- robocat 1y agoAlso mentioned: Chromium: Parsers for PNG, JSON, and web fonts have been replaced with memory-safe implementations in Rust
- SAI_Peregrinus 1y agoThat ends up being "rewrite it in Rust" because new code includes changes to existing code. A nice thing about Rust is that you can generally rewrite things piecewise there's no need to switch everything at once.
- danudey 1y agoGo look at the comments on any Phoronix article involving Rust in any way and you'll see that it's 80% rust haters making all the same arguments every Rust hater makes. You can implement the same safety features in C++ and assembly if you know what you're doing! You can still write bugs in Rust! I know someone who tried to learn rust and he accidentally deleted his home directory so everyone may as well stick to C! It's all nonsense, but it would be hilarious if it weren't so ignorant.
- ActorNightly 1y ago>It's all nonsense, How is any of that wrong?
- marcosdumay 1y agoOn the sense that you can write a Rust compiler in C and use it to program your software in a better language, yes, all of that is correct.
- IshKebab 1y ago1. You don't know what you're doing - everyone makes mistakes. 2. You can still write bugs in Rust but the point is you are far less likely to.
- tonyhart7 1y agoYeah but 1000x less mistake ????? I mean these people behind android project is atleast one of the better engineer but jesus christ if they can improve so much then I dont know how much average joe can benefit from that
- AlotOfReading 1y agoIt's not 1000x fewer mistakes overall, it's 1000x fewer mistakes of this one specific family that Rust is designed to eliminate. They've also seen improvements in developer confidence and onboarding time, but not to the same degree.
- ActorNightly 1y agoRust makes sense in the case of Android, where the kernel and software is rolled by Google. In the same way that Java made sense for a lot of the backend services in 2010s despite its drawbacks before Node and Python got major improvements in speed and compute became cheaper. That however is a very niche case where Rust is applicable. The anti-rust people (like me) aren't saying that Rust is bad. We are just arguing against its adoption for everything. When you see shit like "[...] should be rewritten in Rust because memory safe", it shows that people have no idea what memory safety even is. There is this dumb belief stemming from lack of proper CS education that any code you write can just randomly have memory safety issues. The downsides of Rust is that its ownership semantics are often cumbersome to write, which slows down development. Rust is also still evolving because of the stuff that happens under the hood. And for a lot of things, where network latency is dominant and cpu cycles are spent sleeping waiting for responses to come back, you don't need natively compiled code in lieu of python or node that are way more flexible and faster to develop in. So in most cases, Rust is not applicable, when you can write perfectly memory safe code faster.
- iknowstuff 1y ago> There is this dumb belief stemming from lack of proper CS education that any code you write can just randomly have memory safety issues. lol. this take is hilarious in the face of the article you are commenting on. holy cognitive dissonance. > The downsides of Rust is that its ownership semantics are often cumbersome to write skill issue
- ActorNightly 1y ago>skill issue Lol, this is actually very ironic considering Rust is handholding you because you don't have the skills to write memory safe code. Like I said in my other posts, Rust makes sense in very niche situations. The article just proves that it works for the niche case where its applicable. That doesn't mean Rust automatically wins.
- iknowstuff 1y ago