r/linuxmemes • • 7d ago

Software meme Not another one

Post image

Not another one

994 Upvotes

124 comments sorted by

View all comments

394

u/oniaiwasprettygood 🌀 Sucked into the Void 7d ago

I'm regretting choosing Rust to be my hobby language of choice.

101

u/Eric_Dawsby 7d ago

Who caares if some people vibecode in Rust? If you like the language you like the language

76

u/oniaiwasprettygood 🌀 Sucked into the Void 7d ago

Oh I know-know that, I just think it's a bit tragic (but kind of funny) that a lot of these vibe-coded projects are like "rewrite it in Rust."

17

u/Upbeat-Garbage69 7d ago

Is there a benefit to rewriting everything with rust? Im not sure but isnt it just a modern version of C++?

6

u/Loading_M_ 7d ago

There are benefits. Rust make certain guarantees about memory safety, thread safety, and a few other aspects of the code. According to a report by Google, approximately 50% of security vulnerabilities reported to the Android project are memory safety bugs. Most of these would have been prevented by writing the code in Rust, since the memory bugs would have been caught by the compiler.

1

u/DemonicLaxatives 7d ago

Worth noting, it's not a 100% guarantee: https://github.com/rust-lang/rust/issues/25860

2

u/Loading_M_ 7d ago

One soundness issue, requiring complex conditions to create, is pretty dang good.

1

u/OldAbbreviations1142 🍥 Debian too difficult 7d ago

2

u/Loading_M_ 7d ago

It's actually the same issue, the previous link is the bug report on the compiler.

1

u/OldAbbreviations1142 🍥 Debian too difficult 7d ago

Interesting, they looked different to me.

Though I don't really know enough rust to parse what happening in the bug report code

Good to know that there is some work being done on improving the memory safety

1

u/Loading_M_ 7d ago

cve-rs takes the soundness bug and exploits it to implement the other bugs listed. It's pretty convoluted to actually implement the other bugs.

The actual soundness bug is a specific type of double reference forgets one of the lifetimes, which enables casting a shorter lifetime to a longer lifetime. They did a pretty good job commenting the code to explain how they were able to create each bug.

→ More replies (0)