TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

The Rust Implementation of GNU Coreutils Is Becoming Remarkably Robust

261 pointsby sdht0over 2 years ago

15 comments

unixgoddessover 2 years ago
I wonder why not reimplement coreutils as library functions, to be used within an ad-hoc REPL. It would be much more flexible and extensible.<p>AFAIK, originally the reason why they were made as programs was that the available programming languages were too cumbersome for such use. Now we have plenty of experience making lightweight scripting languages that are pleasant to use in a live environment (vs premade script), so why give up the flexibility of ad-hoc scripting?
评论 #34737950 未加载
评论 #34737483 未加载
评论 #34737338 未加载
评论 #34738992 未加载
评论 #34738596 未加载
评论 #34737199 未加载
synergy20over 2 years ago
the coreutil rust flavor is 16MB per its release build. after strip it cuts down to 10MB, that&#x27;s the smallest size you can have.<p>Comparing to c version coreutils, which totals up to 5.8MB, rust does have a slight size &quot;problem&quot;, its size is 70% larger even with the busybox-all-in-one style.<p>you&#x27;re actually forced to do it the busybox style, otherwise each single small utility of coreutils will be about similar size, say, 6MB for each one, then it will just blow up really fast.<p>I commented somewhere else, the rust stdlib by default(AND by design) is statically linked, which is totally different from the shared stdlibs like C and C++ etc, that will leads to large size when you have a few of rust release binaries. I have never figured out why Rust can not do the shared-stdlib -just-like-c-c++ yet.
评论 #34739902 未加载
harry8over 2 years ago
How does this work wen you want to add a flag?<p>Eg once upon a time I thought it would be fun to add a flag to ls to limit its results to a certain kind of file so you could list only directories for example. It came up for me as something I needed so I did it. Somebody on the gnu mailing list for core utils rejected it on the basis of ls &quot;having a high bar&quot; for a new flag. $ man ls suggests this hasn&#x27;t been a consistent policy. It wasn&#x27;t clear to me if that person was in charge or it was just a vague notion of theirs or anything useful so obviously I dropped it because I&#x27;d have something different from someone if there was any interest.<p>The Rust implementation might come to precisely the same conclusion that it isn&#x27;t worthwhile. But they also might not on some case if not that one.<p>Do they do what&#x27;s better or do they do what&#x27;s Gnu always and everywhere?<p>Do they wait until they have significant traction and only then consider such things?<p>Interesting questions for them to ponder and maybe they have?
评论 #34737502 未加载
nishsover 2 years ago
from the slides:<p>&gt; Lots of crates (Rust libraries) available - Don&#x27;t have to reimplement the wheel:<p>&gt; lscolors, walkdir, tempfile, terminal_size<p>i believe this isn&#x27;t always quite an advantage that the slides make it out to be when implementing tools as critical as coreutils. you typically would want internal packages that you can precisely control.
评论 #34739816 未加载
评论 #34739144 未加载
评论 #34753737 未加载
评论 #34739066 未加载
hulituover 2 years ago
&gt; The Rust Implementation of GNU Coreutils Is Becoming Remarkably Robust<p>And performance ?
评论 #34736265 未加载
pjmlpover 2 years ago
I remember previous attempts to do this in Ada.
评论 #34736802 未加载
评论 #34767615 未加载
AndrewDavisover 2 years ago
I&#x27;m now imagining a distro using relibc (rust implementation of POSIX libc from RedoxOS) and uutils.
评论 #34753826 未加载
评论 #34737001 未加载
评论 #34736627 未加载
shrubbleover 2 years ago
Robust in comparison to what? Is the current coreutils lacking in robustness?
评论 #34740981 未加载
josephcsibleover 2 years ago
I just wish it was copyleft like the real coreutils instead of being pushover-licensed. Now the corporations are all going to start making proprietary forks of this.
评论 #34736376 未加载
评论 #34737579 未加载
评论 #34736259 未加载
评论 #34736276 未加载
评论 #34736089 未加载
评论 #34739451 未加载
评论 #34740148 未加载
评论 #34736054 未加载
评论 #34784706 未加载
评论 #34738289 未加载
评论 #34738178 未加载
评论 #34736479 未加载
0x008over 2 years ago
How do you measure robustness except with failures &#x2F; years of service x times deployed ? You cannot make edge cases and strange unique behavior happen in a controlled environment.
评论 #34736894 未加载
评论 #34739590 未加载
rurbanover 2 years ago
Nice, with mv&#x2F;cp -g, which was rejected upstream.<p>Now just unorm from Assaf Gordon&#x27;s multi-byte-20200607.patch is missing: <a href="https:&#x2F;&#x2F;github.com&#x2F;rurban&#x2F;coreutils&#x2F;commit&#x2F;4008663077be6a740751dfd08f664076d34b036e">https:&#x2F;&#x2F;github.com&#x2F;rurban&#x2F;coreutils&#x2F;commit&#x2F;4008663077be6a740...</a>
vkakuover 2 years ago
This is great. Chimera Linux uses the FreeBSD userland version of the utilities. It&#x27;s refreshing to see new distros taking charge of their development.
dezgegover 2 years ago
How well is this working nowadays with non-UTF8 input?
throwaway777845over 2 years ago
are they fully compatible?
评论 #34737490 未加载
vbezhenarover 2 years ago
I wish someone would build modern lean utils. I don&#x27;t need bazillion grep flags. There&#x27;s so much unnecessary repetition in unix tools. Why make separate flag for input and output files when I can just redirect input and output with shell, just for one example. Theoretically most unix tools could be implemented in very few lines of code and that&#x27;s their beauty.
评论 #34738519 未加载
评论 #34737487 未加载
评论 #34738146 未加载