TE
科技回声
首页24小时热榜最新最佳问答展示工作
GitHubTwitter
首页

科技回声

基于 Next.js 构建的科技新闻平台,提供全球科技新闻和讨论内容。

GitHubTwitter

首页

首页最新最佳问答展示工作

资源链接

HackerNews API原版 HackerNewsNext.js

© 2025 科技回声. 版权所有。

The Rust Implementation of GNU Coreutils Is Becoming Remarkably Robust

261 点作者 sdht0超过 2 年前

15 条评论

unixgoddess超过 2 年前
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 未加载
synergy20超过 2 年前
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 未加载
harry8超过 2 年前
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 未加载
nishs超过 2 年前
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 未加载
hulitu超过 2 年前
&gt; The Rust Implementation of GNU Coreutils Is Becoming Remarkably Robust<p>And performance ?
评论 #34736265 未加载
pjmlp超过 2 年前
I remember previous attempts to do this in Ada.
评论 #34736802 未加载
评论 #34767615 未加载
AndrewDavis超过 2 年前
I&#x27;m now imagining a distro using relibc (rust implementation of POSIX libc from RedoxOS) and uutils.
评论 #34753826 未加载
评论 #34737001 未加载
评论 #34736627 未加载
shrubble超过 2 年前
Robust in comparison to what? Is the current coreutils lacking in robustness?
评论 #34740981 未加载
josephcsible超过 2 年前
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 未加载
0x008超过 2 年前
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 未加载
rurban超过 2 年前
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>
vkaku超过 2 年前
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.
dezgeg超过 2 年前
How well is this working nowadays with non-UTF8 input?
throwaway777845超过 2 年前
are they fully compatible?
评论 #34737490 未加载
vbezhenar超过 2 年前
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 未加载