Rust Coreutils 0.5.0 Release: 87.75% compatibility with GNU Coreutils
Posted by maxloh 1 day ago
Comments
Comment by ottah 1 day ago
Also, I have major issues with dumping GPL userspace utilities, for an MIT license suite, that is known to not be feature complete, only, and literally only because it was written in Rust. This does not make sense, and this is not good for users.
Comment by cogman10 1 day ago
> Also, I have major issues with dumping GPL userspace utilities, for an MIT license suite, that is known to not be feature complete, only, and literally only because it was written in Rust. This does not make sense, and this is not good for users.
Thinking about it, I guess I have to agree. This allows ubuntu to avoid releasing security fixing patches if they so choose. You can't do that with GPLed code. It means they can send out binary security fixes and delay the source code release for as long as they like or indefinitely. Which is pretty convenient for a company that sells extended security support packages.
Comment by SkiFire13 1 day ago
The GPL does not state that the source code for any modification must be released immediately, it doesn't even set some kind of time limit so it technically doesn't prevent indefinite delays either.
Comment by tremon 1 day ago
I would think that the regression tests are actually the most worthwhile targets for the new project to validate against: they represent real-world usage and logic corner cases that are evidently easy to get wrong. These are not the kind of bugs that Rust is designed to eliminate.
Comment by cogman10 1 day ago
I believe Ubuntu simply copied and transposed a bunch of tests from gnu core utils and that's where these ultimately came from. That doesn't really mean that all these tests arose due to regressions. (for sure some probably did).
Comment by ChrisSD 23 hours ago
Comment by ekjhgkejhgk 1 day ago
Comment by pseudalopex 1 day ago
Comment by ekjhgkejhgk 1 day ago
Comment by thayne 1 day ago
Comment by egorfine 1 day ago
And this is precisely why the worst Rust evangelists aim to rewrite it: virtue signaling with no suffering of the opposing party is not good enough.
Comment by tremon 1 day ago
Comment by thayne 1 day ago
You don't think these are ever run with sudo/runas/pkexec/run0 or otherwise invoked by a program running as root?
That said I do think things like sudo, ssh, gpg, maybe systemd, http servers like nginx and apache etc. are more valuable to replace with tools written in rust (or more generally a "memory safe language"). But that doesn't mean rewriting coreutils isn't valuable.
Comment by egorfine 1 day ago
Comment by paulddraper 1 day ago
????
Comment by MangoToupe 1 day ago
Comment by stackghost 1 day ago
Stallman comes from the era when C was good enough, because computing was not a hostile environment like it is today.
GNU is never going to "rewrite it in rust" as long as he's living, and probably for several years afterwards.
In other words, it's a social problem not a technical one.
Comment by c0l0 1 day ago
Let new generations of Free Software orgs come along and supplant GNU with a GBIR (GNU But In Rust), but don't insist on existing, established things that are perfectly good for who and what they are to change into whatever you prefer at any given moment.
Comment by throwaway613745 1 day ago
sudo apt purge --autoremove --allow-remove-essential coreutils-from-uutils # reinstalls gnu coreutils
sudo update-alternatives --config sudo # can switch back to regular sudo from sudo-rs
(for Ubuntu 25.10)
Comment by hu3 23 hours ago
why ship broken implementation prematurely?
Comment by throwaway613745 22 hours ago
Comment by akagusu 1 day ago
Comment by josephg 1 day ago
As an aside, I find it weird how much negativity rewrites like this get. If someone decided to make a new web browser, C compiler or kernel people would be congratulating them. I really don’t understand the conservatism when it comes to Linux. Is the current implementation perfect? Should it be preserved in amber? The gnu runtime seems like a messy, badly specified hairball of hacky, inconsistent scripts to me. Some guys in a certain room in the 70s and 80s wrote some C programs. And now every bad idea they had lives in perpetuity in my /usr/bin directory? In the decades since, these tools have sprouted hundreds of weird features that almost nobody uses. And now what, people care what language it’s all written in? This code must never be changed?? Who cares.
Comment by ottah 1 day ago
I just don't see what's to gain, to suffer through years of instability, waiting for a userspace suite to mature, and reach feature parity, when we have a well understood, and safe tool set know.
Maybe in five years, when coreutils is complete, I'd be okay with Ubuntu replacing user land with it. But we're not there, and it's a problem we shouldn't have to tolerate.
Also I can't stand we're leaving GPL code behind for MIT.
Comment by steveklabnik 1 day ago
Comment by ottah 1 day ago
The problem, and the real issue I have is that this project is being used as the default in major linux distros. Eager adoption of this project, and making it the production target does take away things from me. The interface has changed, stability is affected. Correctness is now measured against this incomplete implementation first, not the known correct, and stable GNU coreutils.
Comment by steveklabnik 1 day ago
Comment by pseudalopex 1 day ago
Many people call Ubuntu flavors distributions. This includes Ubuntu developers.
Ubuntu made it default. The tire kicking analogy was incorrect.
> The purpose is exactly because the GNU versions are being treated as the proper versions. Divergences from them are being fixed, so that this new version follows those. You can only do that by actually trying them out, because it’s impossible for the test suite to cover every behavior.
You should assume everyone understands how Ubuntu's decision would benefit this project. You should assume most Ubuntu users do not care.
Comment by josephg 1 day ago
You seem mad that a Linux distribution (Ubuntu) is trying this software out. Why do you care so much? Do you expect some of the programs you use to break? Have they?
If you don’t want to use uutils, I have good news. You can opt out. Or use Ubuntu LTS. Or use a different distribution entirely. I suspect you’re mad for a different reason. If all the tests passed, would you still be mad? Do you feel a similar way about angry projects like alpine Linux, which ship code built on musl? All the same compatibility arguments apply there. Musl is also not 100% compatible with glibc. How about llvm? Do you wish we had fewer web browsers?
Or maybe, is it a rust thing in particular? Like, if this rewrite was in C, C++ or go would you feel the same way? Are you worried more components of Linux will be ported to rust? (And if so, why?)
Ultimately the strength (and weakness) of Linux is that you’re not locked in to anything. I don’t understand how the existence of this software could make your life worse. If anything it sounds like it might be helping to clarify your stance on OS stability. If you want to make a principled stance there, there’s plenty of stable Linux distributions which will mirror your values. (Eg debian, Ubuntu lts, etc). Or you can just opt out of this experiment.
Given all of that, the tone I’m inferring from your comments seems disproportionate. Whats going on? Or am I misreading you?
Comment by pseudalopex 1 day ago
You confused blunt responses to repetitive, condescending, specious, or false statements and anger at Canonical seemingly.
I made no objection to any software existing.
I like Rust. It was unfortunate this experiment supported stereotypes of Rust fanatics promoting Rust without respect for stability.
I reject the view users should have to wait 2 years for bug fixes and features, accept silently all experiments, or switch silently to a distribution with less 3rd party support and other issues inevitably.
The opt out process I saw required --allow-remove-essential. It would be irresponsible to recommend this.
A more responsible way to conduct this experiment would have been opt in 1st. Then phased. Then opt out for everyone. And waiting until all tests passed would have been better of course.
Comment by steveklabnik 1 day ago
Comment by pseudalopex 1 day ago
Calling something an experiment does not make it exempt from criticism.
> It’s how you get broad enough usage to see if it’s ready.
My understanding was it was known not 100% compatible. And what did I say you should assume?
> If it isn’t by the time for LTS, then it’ll be unmade as the default.
People use non LTS releases for non experimental purposes.
Comment by steveklabnik 1 day ago
All software has bugs. Plus, not every bug is in the test suite. There are open bugs in all of the software shipped by every distro. Software can be ready for use even if there are know bugs in corner cases. Regular coreutils has open bugs as well.
Comment by pseudalopex 1 day ago
No one did this.
> All software has bugs. Plus, not every bug is in the test suite. There are open bugs in all of the software shipped by every distro. Software can be ready for use even if there are know bugs in corner cases. Regular coreutils has open bugs as well.
Stop speaking as if other people know nothing of software development. GNU do not break compatibility knowingly and with no user benefit.
Comment by steveklabnik 1 day ago
Comment by pseudalopex 1 day ago
Comment by hnthrow82910 1 day ago
Comment by bitwize 1 day ago
One of the major problems with C, which like a lot of C's issues Rust just doesn't have, is that it's getting more difficult to find young, eager programmers willing to maintain a C codebase. The hassle of C outweighs the rewards, especially when Rust exists. So, ceteris paribus, development on the Rust version will outpace the C version, and you'll get more and smarter eyes on the code base.
Best to put the C code out to pasture, i.e. in maintenance mode only, with a deprecation plan in place.
Comment by josephg 1 day ago
If you want a purely gnu userland with gpl code and strong stability guarantees, Ubuntu is almost certainly the wrong distribution for you. Plenty of Linux distributions are far more stable, and won’t replace coreutils, maybe forever. (And if this is aiming to be bug for bug compatible, they won’t ever have to.)
As for the gpl, this isn’t new. there’s been bsd/mit licensed alternatives to coreutils for decades. You know, in FreeBSD and friends. It’s only aiming for 100% Linux compatibility that’s new. And I guess, shipping it in Linux. But let’s be real, the gpl v3 is a pretty toxic license. By trying so hard to preserve user freedom, it becomes a new tyranny for developers. If you build a web based startup today hosted on top of Linux, you might be in breach of the gpl. What a waste of everyone’s time. The point of opensource to me is nobody can tell me what I’m allowed to do with my computer. And that includes RMS.
Comment by jitl 1 day ago
Comment by masklinn 1 day ago
it would probably be a lot stronger an argument if sudo hadn’t also had a few privilege escalation CVEs recently.
Comment by hnthrow82910 1 day ago
Comment by wavemode 1 day ago
I doubt this is true in practice. The majority of coreutils spend the majority of their time waiting for the results of IO/syscalls. (The exception would probably be, the hashing utilities like md5sum.)
Comment by stefan_ 1 day ago
Comment by josephg 1 day ago
Is all the code being compiled with the same flags? Shasum probably benefits a lot from intrinsics that are only available on newer CPU targets.
Comment by 0cf8612b2e1e 1 day ago
Comment by josephg 1 day ago
The Fil-C compiler is a fork of llvm. There's no way all that garbage collection code would make fil-c faster. So if its faster, its probably using different target flags. And in that case, its not a fair benchmark comparison.
Comment by stefan_ 1 day ago
I just think the assertion that "compute-heavy" tools like sha256sum would be especially affected by Fil-C is not true, and if that was true given the "baseline slowdown" of 4x, surely it would show up in this sloppy test.
Comment by bfrog 1 day ago
Comment by f_devd 1 day ago
Comment by westurner 1 day ago
Comment by testdelacc1 1 day ago
Comment by bfrog 1 day ago
Comment by testdelacc1 1 day ago
Comment by bitbasher 1 day ago
I know which I prefer.
Comment by yjftsjthsd-h 1 day ago
In Fil-C?
Comment by lucyjojo 8 hours ago
Comment by stefan_ 1 day ago
Meanwhile, the Rust version of course is vulnerable to all of those: https://ubuntu.com/security/notices/USN-7867-1
Comment by zorked 1 day ago
Comment by IshKebab 1 day ago
Comment by egorfine 1 day ago
Comment by alextingle 1 day ago
Comment by IshKebab 1 day ago
Comment by throwaway613745 22 hours ago
Rust coreutils are MIT licensed.
Canonical sells extended support and security packages.
It’s completely reasonable to think they will want to monetize additional patches on coreutils as part of their commercial offerings.
Comment by squirrellous 21 hours ago
Comment by estebank 20 hours ago
> Our key objectives include:
> Matching GNU's output (stdout and error code) exactly
> Better error messages
> Providing comprehensive internationalization support (UTF-8)
> Improved performances
> Extensions when relevant (example: --progress)
> uutils aims to work on as many platforms as possible, to be able to use the same utils on Linux, macOS, Windows and other platforms. This ensures, for example, that scripts can be easily transferred between platforms.
Experimenting with better error messages, as test-bed for extensions that might not be able to be tried or accepted in GNU coreutils (for technical, social or other reasons), and being able to use the same tools in all major OS are very reasonable divergences from GNU's project to "justify" its existence.
The project was originally just a learning project for someone who wanted to learn Rust by reimplementing tools that were small, not a moving target and useful. From there, it grew as it found an audience of developers interested in productionalizing it. There have been coreutils ports for the languages you mention (go-coreutils, pycoreutils, coreutils-cpp, etc.), they just didn't (yet?) hit critical mass. It is a harder sell for GC-based projects in this case because they are unlikely to ever be included as part of a dirtribution's base. Lets not forget that coreutils themselves are a rewrite of previously existing tools to begin with.
Comment by WD-42 1 day ago
I know they claim it’s a clean implementation but cmon, there’s no way they aren’t peeking at the existing coreutils source.
Comment by steveklabnik 1 day ago
Comment by WD-42 1 day ago
Comment by electroly 1 day ago
Comment by steveklabnik 1 day ago
I’m also curious about this: does that it’s in a different language make any difference here? Like I could also maybe see what you’re saying if these were also in C, but being in Rust, it’s not like they can literally copy the code, regardless. I know you’re talking about feelings and not hard and fast rules, but do you think that plays into any of the feelings at all?
Comment by WD-42 1 day ago
My feelings stem from what I perceive as the degradation of the old school hacker ethos into a more corporate friendly environment. Especially during this time when the bigger companies are salivating at the mouth to replace SWEs with AI at the same time encouraging us to pick friendly licenses so they can take advantage of our volunteer work…
Comment by steveklabnik 1 day ago
Anyway, thanks for replying. It’s always interesting to hear how people think. I personally feel differently, but I’m sure it’s nothing you haven’t heard before. :)
Comment by gjsman-1000 1 day ago
The question about whether Linux and GNU copied from the proprietary originals caused the famous SCO lawsuits. Even though this was proven false, there’s very little chance the originals weren’t used as reference in GNU.
Comment by lnkl 1 day ago
Comment by gjsman-1000 1 day ago
BSD wasn’t under an open license when GNU got started, so GNU reimplemented the proprietary UNIX utilities with their own enhancements and their own GPL license.
As such, complaining about the license is rich, considering GNU basically stole it themselves from the first round. And to this day, HN complaining about macOS’s utilities is also rich considering they are actually more standard and authentically UNIX than GNU.
Comment by collinfunk 1 day ago
https://github.com/apple-oss-distributions/text_cmds https://github.com/apple-oss-distributions/system_cmds https://github.com/apple-oss-distributions/file_cmds https://github.com/apple-oss-distributions/adv_cmds https://github.com/apple-oss-distributions/shell_cmds https://github.com/apple-oss-distributions/misc_cmds
Comment by vermaden 1 day ago
Comment by swiftcoder 1 day ago
Comment by pseudalopex 1 day ago
Comment by josephg 1 day ago
Comment by vasac 1 day ago
Comment by testdelacc1 1 day ago
Comment by hnthrow82910 1 day ago
Comment by burnt-resistor 1 day ago
Related: Because of Redhat/Fedora's decision; CentOS Stream, Alma, and Rocky 9 & 10 Docker images use a statically-linked "multi-call" variant of coreutils that is also problematic in real-world usage. This can be fixed with the following:
sudo dnf install coreutils --allowerasing -yComment by Barrin92 1 day ago
nobody runs Ubuntu's six-month releases in production. Like Fedora it's cutting edge in the literal sense of that term, and if you deploy Ubuntu anywhere in the business world you're on the LTS release.
That the rust coreutils aren't at full parity yet is explicitly mentioned in the release notes of 25.10, if you're installing a distribution with a lifespan of half a year it pretty much goes without saying you're a beta tester for the next LTS release. Like, even if everything was pristine and stable it makes no sense to use an operating system with six months of support in production.
Comment by burnt-resistor 1 day ago
Comment by knorker 1 day ago
IOW: how much does it matter?
Comment by pseudalopex 1 day ago
Comment by knorker 1 day ago
Comment by NekkoDroid 22 hours ago
It would be more of a comparison if dash was aiming to be a drop-in replacement for bash and not a POSIX shell.
Comment by knorker 20 hours ago
Obviously on a GNU system one can't just drop the GNU extensions, but what Rust Coreutils is fighting is (IIUC) to a large extent the goal of becoming bug-compatible, or unspecified-compatible.
For unspecified-compatible, to support users who relied on it (Hyrum's law), the same case could be made that lots of people relied on /bin/sh being bash.
dash may not have been aiming to be drop-in replacement for bash, but when OS vendors change /bin/sh to dash, what's the difference?
Comment by NekkoDroid 16 hours ago
I don't know about that, I at least wouldn't 100% agree on that. Mostly since POSIX only defines short args it kinda makes just not want to use them, since I like to spell out the long arg in scripts for clarity. So by default I just assume I am using GNU coreutils (since BSD coreutils have slightly different names in some places IIRC). And since there isn't such a destinction between "POSIX coreutils" and "GNU coreutils" like there is with "POSIX shell" (sh) and "bash" I wouldn't call the situations equivalent.
Comment by pseudalopex 19 hours ago
Comment by IshKebab 1 day ago
Probably was a bit premature for Ubuntu to enable it by default. Looking at the graph uutils will be fully compatible (or as close as makes no difference) in about 2 years, so I would have waited until then.
Still, I think most of the push-back is just the usual anti-Rust luddites.
Comment by knorker 1 day ago
I just tried that on three very different Linux systems of mine, and all print `unknown`.
Comment by kachapopopow 1 day ago
also people complaining about inclusion of it in ubuntu versions, wait till you find out about the linux kernel.
Comment by tormeh 1 day ago
Comment by kachapopopow 14 hours ago
Comment by groundzeros2015 1 day ago
Check the extent to which this is true. Also are we rewriting good kernel code that works?
Comment by kachapopopow 1 day ago
Comment by pseudalopex 1 day ago
Does the Linux kernel ship with rather experimental features as default? When was the rule not to break user space revoked?
Comment by kachapopopow 14 hours ago
Comment by pseudalopex 14 hours ago
Comment by IshKebab 1 day ago
The fallacy here is that code is either "good code that works" or "bad code that needs to be rewritten". It doesn't work like that. "If it aint broke don't fix it" is actually terrible advice.
Comment by groundzeros2015 1 day ago
We want to give up good things to get better things.
What is the vision for improving these tools with rust? What user benefit are they promising?
I’ve heard nothing but nebulous arguments about memory or security purity. There is no insight into how to do them better or faster; and in most cases they have demonstrated they didn’t even understand them fully to begin with, such as missing locales.
There isn’t even subjective value for users demanding it, it’s driven by rust developers.
Comment by estebank 19 hours ago
From their README, they promise better error messages, extensions when relevant (example: --progress), and Linux, macOS, Windows and other platforms support. It is my understanding that the GnuWin32 coreutils were last updated in 2017 and had some subtle differences to regular GNU coreutils, so that's one set of users for whom there's clear benefit. Faster speed could be accomplished if architectural changes are viable, but for many of these tools they are IO-bound.
Comment by burnt-resistor 1 day ago
Rust, by itself, isn't a panacea to add formal verification but one leg on the footstool of formal verification methodologies to produce safe(r/ish) software rather than subtly buggy software that's difficult to prove correct and more expensive to maintain.
"If it aint broke don't fix it" =~= "I've never gotten into an accident until now, so airbags and seatbelts are pointless." ==> reactive methodology / failure / hubris
Comment by groundzeros2015 1 day ago
Comment by mynameismon 1 day ago
Comment by steveklabnik 1 day ago
If it’s not ready, they’ll roll it back.
Part of why you have to do something like this is because the test suite just isn’t comprehensive, nor should we expect it to be. Real world usage is what shakes out the long tail of bugs. You just have to have some sort of stage like this in order to get things into a good state.
Comment by egorfine 1 day ago
They will absolutely not roll it back, not matter how broken they are.
The reasons to switch from coreutils to the Rust rewrite are purely political.
Comment by pseudalopex 1 day ago
Did 100% of tests pass when Ubuntu made this decision? My understanding was no.
Comment by steveklabnik 1 day ago
In other words, there may be more serious bugs not in the test suite than the ones that aren’t passing that are in the suite. And you only find that out through real usage.
Comment by mzajc 19 hours ago
This is a horrible mindset for developing software people are supposed to rely on.
Comment by steveklabnik 16 hours ago
Comment by pseudalopex 13 hours ago
Comment by steveklabnik 12 hours ago
Comment by pseudalopex 10 hours ago
Must I repeat? You should assume everyone understands how Ubuntu's decision would benefit this project. You should assume most Ubuntu users do not care.
> Nothing has been replaced yet.
Replace means put something in the place of another thing. Not eradicate the other thing.
Comment by pseudalopex 1 day ago
This standard may be justified when there is significant benefit. There is not in this case. And some projects have stricter standards.[1]
> In other words, there may be more serious bugs not in the test suite than the ones that aren’t passing that are in the suite. And you only find that out through real usage.
You should assume everyone understands how Ubuntu's decision would benefit this project. You should assume most Ubuntu users do not care. You replied to a comment which told you this before.[2]
Comment by tredre3 1 day ago
Comment by steveklabnik 1 day ago
For example, sort has an open PR on it right now.
Comment by pseudalopex 14 hours ago
And this project should be considered then. Not before.
Comment by steveklabnik 12 hours ago
Comment by itsn0tm3 1 day ago
Comment by kachapopopow 1 day ago
Comment by drnick1 1 day ago
Comment by egorfine 1 day ago
Comment by samdoesnothing 1 day ago
Comment by nonameiguess 1 day ago
- coreutils
- findutils
- libmagic and file
- tar and some compression libs
- grep, awk, sed
- the shell and all of its builtins
- something functionally equivalent to openssl or GnuTLS
- some ssh client and server
- curl
- a terminal-based editor
- man-db and texinfo
- some init system and bootloader
- pick a package manager, any package manager, and rewrite it in Rust
Barring all of that, maybe just busybox but written in Rust. That should give you roughly what you need for a non-graphical system. coreutils isn't nothing, but it's a pretty small part of the system, with much of it ending up implemented by the shell in most distros.
Comment by egorfine 1 day ago
Comment by steveklabnik 1 day ago
Comment by adgjlsfhk1 1 day ago
Comment by panick21_ 1 day ago
There is of course RustTLS that already exists and is already very advanced.
For package manager see for example AerynOS (or its new name that I can't remember).
There are lots of rust editors, terminal and otherwise.
And of course the complete Cosmic Desktop is written in Rust, so you don't have to go 'non-graphical' at all.
So AerynOS, with uutils and Cosmic is very close I would say.
Comment by steveklabnik 1 day ago
Comment by panick21_ 1 day ago
Comment by steveklabnik 21 hours ago
Comment by master_korin 1 day ago
Comment by jeffbee 1 day ago
I like the project but beware.
Comment by Sharlin 1 day ago
(Sure, I realize that GNUcu is old and mature enough to have been pretty thoroughly debugged by this point.)
Comment by steveklabnik 1 day ago
Comment by josephg 1 day ago
Comment by knorker 1 day ago
Another commenter said "dumb cases where it's 100x slower when providing unrealistic values like parsing e9000000 which is actually because it attempts to actually parse it due to bigint support instead of clamping to i128".
Comment by bgwalter 1 day ago
Comment by maxloh 1 day ago
Comment by vb-8448 1 day ago