News for hackers. Stuff that matters.
Re:Apt Rust requirement raises questions by epolanski on Tuesday November 25, 2025 @10:02AM (#46046358)
The problem is that rust is being shoved in pointless places with a rewrite-everything-in-rust mentality.

There's lunatics that want to replace basic Unix tools like sudo, etc, that are battle tested since ages which has been a mess of bugs till now.

Instead Rust should find it's niches beyond rewriting what works, but tackling what doesn't.

Re:Apt Rust requirement raises questions by saghm on Tuesday November 25, 2025 @10:21AM (#46046590)
FWIW sudo has been maintained by an OpenBSD developer for a while now but got replaced in the base system by doas. Independent of any concerns about Rust versus C, I don't think it's quite as unreasonable as you're claiming to consider alternatives to sudo given that the OS that maintains it felt that it was flawed enough to be worth writing a replacement for from scratch.
Re:Apt Rust requirement raises questions by SoftTalker on Tuesday November 25, 2025 @11:38AM (#46047575)
sudo had grown a lot of features and a complicated config syntax over the years, which ended up being confusing and rarely needed in practice. doas is a lot simpler. It wasn't just a rewrite of a flawed utility but a simplification of it.
Re:Apt Rust requirement raises questions by saghm on Tuesday November 25, 2025 @01:21PM (#46048878)
Regardless of the exact terminology used to describe why it was done, my point is that assuming that people are "lunatics" because they want to replace sudo is not a particularly compelling claim, and that's what the comment I was responding to had said.
Re:Apt Rust requirement raises questions by mmastrac on Tuesday November 25, 2025 @10:15AM (#46046511)
sudo is not fully battle tested, even today. You just don't really see the CVEs getting press.

https://www.oligo.security/blog/new-sudo-vulnerabilities-cve...

Re:Apt Rust requirement raises questions by jamespo on Tuesday November 25, 2025 @11:16AM (#46047276)
Neither of those vulnerabilities look like rust would necessarily help however
Re:Apt Rust requirement raises questions by metaltyphoon on Tuesday November 25, 2025 @01:55PM (#46049307)
Thats not the point OP was mentioning as in “battle tested” doesn’t mean free of bugs.
Re:Apt Rust requirement raises questions by anarki8 on Tuesday November 25, 2025 @10:55AM (#46047023)
> The problem is that rust is being shoved in pointless places with a rewrite-everything-in-rust mentality.

> There's lunatics ...

I think the problem is people calling developers "lunatics" and telling them which languages they must use and which software they must not rewrite.

Battle tested is not bulletproof: https://cybersecuritynews.com/sudo-linux-vulnerability/

Applying strict compile time rules makes software better. And with time it will also become battle tested.

Re:Apt Rust requirement raises questions by epolanski on Tuesday November 25, 2025 @12:48PM (#46048448)
My point had nothing to do with languages.

My point is against rewrites of critical software for the point of rewriting it *insert my favorite language*. Zig is also a safer language than C, so are many other alternatives, yet the Zig community is not obsessed in rewriting old software but writing new one. And the Zig compiler has excellent C interop (in fact it can compile C/C++), yet the community is more focused in writing new software.

There are many factors that make software reliable, it's not just a matter of pretty types and memory safety, there's factors like platform/language stability, skill and expertise of the authors, development speed and feedback.

Re:Apt Rust requirement raises questions by anarki8 on Tuesday November 25, 2025 @06:05PM (#46051911)
> My point is against rewrites of critical software for the point of rewriting it insert my favorite language.

In this specific case we are talking about the maintainer adding a new language into the existing codebase.

I think refactoring parts of the software in the new language is what you call "rewrite" here, correct?

So what improvements does it bring? You actually answered it yourself:

> it's not just a matter of pretty types and memory safety

So indeed, stricter/stronger type system and additional automatic compile time and runtime checks are a major improvement.

> platform

As already mentioned in this thread: neither of the platforms lacking Rust were supported officially anyways.

> language stability

Rust is extremely stable and backwards compatible - 1.0 code still compiles without any issues on 1.90 and will continue to do so for the forseeable future.

> skill and expertise of the authors

The same developers continuing to contribute and newcoming developers have more checks in place to prevent bugs.

> development speed

I guess you imply here that developing in C++ is faster. It's in fact not if your aim is to produce correct software. There are so many more things to keep in mind and take care of with C++, you have fewer automatic checks being done by the compiler and the type system.

About Zig: it's a nice language and much more comfortable to use than C/C++ IMO, but compared to Rust it lacks in strictness and safety, so added benefits are smaller and fewer if you put away subjective preferences.

Re:Apt Rust requirement raises questions by eviks on Wednesday November 26, 2025 @12:57AM (#46054565)
> My point is against rewrites of critical software for the point of rewriting it

Because you're replacing a real point with a made up one, the reason for rewriting is to get the critical benefits for critical software, which battle testing has shown can't be had in the current language, not "my favorite"

> Zig community is not obsessed

They don't even have a 1.0 language? You're also ignoring the critical difference in the level of safety

Re:Apt Rust requirement raises questions by marcosdumay on Tuesday November 25, 2025 @10:36AM (#46046788)
Cue for all those battle tested programs that people keep finding vulnerabilities several decades after they got considered "done". You should try looking at the test results once in a while.

And by the way, we had to replace almost all of the basic Unix tools at the turn of the century because they were completely unfit for purpose. There aren't many left.

Re:Apt Rust requirement raises questions by honeycrispy on Tuesday November 25, 2025 @10:34AM (#46046759)
Calling it pointless comes across as jaded. It's not pointless.

Supporting Rust attracts contributors, and those contributors are much less likely to introduce vulnerabilities in Rust when contributing vs alternatives.

Re:Apt Rust requirement raises questions by rrmm on Tuesday November 25, 2025 @11:06AM (#46047151)
to introduce certain common vulnerabilities ...

not vulnerabilities in general.

Re:Apt Rust requirement raises questions by krior on Tuesday November 25, 2025 @02:32PM (#46049716)
And seatbelts and airbags do not prevent all harm, yet they are still universally used.
Re:Apt Rust requirement raises questions by rrmm on Tuesday November 25, 2025 @04:42PM (#46051149)
It's a pedantic point admittedly, but I think it's important to be realistic and clear that Rust isn't a panacea.
Re:Apt Rust requirement raises questions by dralley on Tuesday November 25, 2025 @10:06AM (#46046399)
Converting parsers to Rust is not "pointless". Doing string manipulation in C is both an awful experience and also extremely fertile ground for serious issues.
Re:Apt Rust requirement raises questions by donkeybeer on Tuesday November 25, 2025 @10:07AM (#46046407)
apt is C++
Re:Apt Rust requirement raises questions by dboon on Tuesday November 25, 2025 @10:41AM (#46046839)
It’s very easy to write a string library in C which makes string operations high level (both in API and memory management). Sure, you shouldn’t HAVE to do this. I get it. But anyone writing a parser is definitely skilled enough to maintain a couple hundred lines of code for a linear allocator and a pointer plus length string. And to be frank, doing things like “string operations but cheaply allocated” is something you have to do ANYWAY if you’re writing e.g. a parser.

This holds for many things in C

Re:Apt Rust requirement raises questions by steveklabnik on Tuesday November 25, 2025 @11:20AM (#46047339)
This is just a variation of the "skill issue" argument.

If it were correct, we wouldn't see these issues continue to pop up. But we do.

Re:Apt Rust requirement raises questions by josefx on Tuesday November 25, 2025 @01:34PM (#46049049)
I think it is more a matter of convenience. There are countless string implementations for C, some tiny projects, others part of larger frameworks like Glib. At the end of the day a C developer has to decide if they are going to pull in half of gnome to handle a few lines of IO or if they are just going to use the functions the C standard conveniently ships with. Most people are going to do the later.
Re:Apt Rust requirement raises questions by criddell on Tuesday November 25, 2025 @11:18AM (#46047307)
> a pointer plus length

What would length represent? Bytes? Code points?

Anyway, I think what you are asking for already exists in the excellent ICU library.

And it's not a very easy thing to maintain. Unicode stuff changes more often than you might think and it can be political.

Re:Apt Rust requirement raises questions by epolanski on Tuesday November 25, 2025 @10:14AM (#46046484)
Issues that are battle tested from ages.
Re:Apt Rust requirement raises questions by Cthulhu_ on Tuesday November 25, 2025 @10:27AM (#46046665)
Sure, which is highly valuable information that hopefully made its way into a testing / verification suite. Which can then be used to rewrite the tool into a memory-safe language, which allows a lot of fixes and edge cases that were added over time to deal with said issues to be refactored out.

Of course there's a risk that new issues are introduced, but again, that depends a lot on the verification suite for the existing tool.

Also, just because someone did a port, doesn't mean it has to be adopted or that it should replace the original. That's open source / the UNIX mentality.

Re:Apt Rust requirement raises questions by sidewndr46 on Tuesday November 25, 2025 @10:05AM (#46046396)
I seem to remember going through this with systemD in Ubuntu. Lots of lessons learned seemed to come back as "didn't we fix this bug 3 years ago?"
Re:Apt Rust requirement raises questions by genewitch on Tuesday November 25, 2025 @10:03AM (#46046375)
We need lisp, cobol, and java in apt, too. and firefox.
Re:Apt Rust requirement raises questions by VWWHFSfQ on Tuesday November 25, 2025 @10:04AM (#46046383)
Is the apt package manager a pointless place? It seems like a pretty foundational piece of supply chain software with a large surface area.
Re:Apt Rust requirement raises questions by metalforever on Tuesday November 25, 2025 @10:32AM (#46046733)
The author of the rust software did not solve the platform problem, as a result it is not a solution. Since it is not a solution, it should be reverted. It's really that simple.