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

科技回声

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

GitHubTwitter

首页

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

资源链接

HackerNews API原版 HackerNewsNext.js

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

Rewriting essential Linux packages in Rust

98 点作者 worble3 个月前

14 条评论

tmtvl3 个月前
Rewriting GPL software under the MIT license is a terrible thing to do. The GPL is meant to protect and preserve what should be basic human rights. So-called "permissive" licenses are meant to provide big tech with free labour.
评论 #43312806 未加载
评论 #43314220 未加载
评论 #43312809 未加载
评论 #43312941 未加载
评论 #43312944 未加载
评论 #43313092 未加载
评论 #43313238 未加载
评论 #43313086 未加载
评论 #43315339 未加载
brian-armstrong3 个月前
&gt; &quot; There are between 200 and 300 dependencies in the uutils project. He said that he understood there is always a supply-chain-attack risk, &quot;but that&#x27;s a risk we are willing to take&quot;. There is more and more tooling around to help mitigate the risk, he said.<p>left-pad II, coming soon to a Linux distro near you
评论 #43312657 未加载
评论 #43312643 未加载
评论 #43312915 未加载
评论 #43312790 未加载
评论 #43313091 未加载
评论 #43312780 未加载
评论 #43313760 未加载
评论 #43313115 未加载
deivid3 个月前
It&#x27;s a fun pasttime. I&#x27;m rewriting mdadm in rust: <a href="https:&#x2F;&#x2F;github.com&#x2F;DavidVentura&#x2F;mdadm-rs" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;DavidVentura&#x2F;mdadm-rs</a><p>Mostly, I am tired of tools requiring root access, or a block device, to function, even in read only mode.<p>If you have a file on disk (eg: a VM&#x27;s disk) mdadm will refuse to show metadata, requiring root to do so.
评论 #43312648 未加载
noja3 个月前
Perl did this!<p><a href="https:&#x2F;&#x2F;perlpowertools.com&#x2F;" rel="nofollow">https:&#x2F;&#x2F;perlpowertools.com&#x2F;</a>
WhereIsTheTruth3 个月前
This article is funny<p>&gt; &quot;I&#x27;m going to state the obvious, that Rust is very good for security, for parallelism, for performance&quot;.<p>&gt; The idea to replace GNU coreutils with Rust versions was not about security, though, because the GNU versions were already quite secure. &quot;They did an amazing job. They almost don&#x27;t have any security issues in their code base.&quot; And it&#x27;s not about the licensing, he said. &quot;I&#x27;m not interested in that debate.&quot;<p>&gt; One of the reasons that Ledru liked Rust for this project, he said, is that it&#x27;s very portable. He is &quot;almost certain&quot; that code he writes in Rust is going to work well on everything from Android to Windows.<p>&gt; Ledru cited laziness as another reason for using Rust. &quot;So if there is a crate or library doing that work, I&#x27;m going to use it. I&#x27;m not going to implement it [myself].&quot; There are between 200 and 300 dependencies in the uutils project. He said that he understood there is always a supply-chain-attack risk, &quot;but that&#x27;s a risk we are willing to take&quot;. There is more and more tooling around to help mitigate the risk, he said.<p>People who keep promote this fraud are fraudsters too
评论 #43313881 未加载
jmclnx3 个月前
Seems this project is MIT-licensed. That is fine, but I cannot help this is a way to get Corporations from following the GPL.<p>I wonder if Linux is re-written i rust will it too remove GPL as a factor ?<p>Again due to the license choice I tend to believe this can be seen as a way to move Linux to a Microsoft Type Windows System.
评论 #43313036 未加载
评论 #43315337 未加载
xixixao3 个月前
I&#x27;ve been using the rewritten coreutils as a reference in implementing human-utils[0].<p>The amount of complexity, even with pretty high-level Rust std, is still super high. So rewriting them in Rust is no small feat.<p>For the file-system management ones: I appreciate the value of everyone knowing these tools, but they do have some terrible defaults, and I wish there was an alternative between using a GUI&#x2F;TUI file manager and carefully not stabbing myself in the foot. That&#x27;s why I started building human-utils (alas it&#x27;s very much unfinished).<p><a href="https:&#x2F;&#x2F;github.com&#x2F;xixixao&#x2F;human-utils" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;xixixao&#x2F;human-utils</a>
评论 #43312811 未加载
timewizard3 个月前
&gt; &quot;I&#x27;m going to state the obvious, that Rust is very good for security, for parallelism, for performance&quot;.<p>That&#x27;s not obvious.<p>&gt; He is &quot;almost certain&quot; that code he writes in Rust is going to work well on everything from Android to Windows.<p>I&#x27;d think the problem with security in code is cocky developers who believe that some part of the environment is magical and can save them from themselves.<p>&gt; Ledru cited laziness as another reason for using Rust. &quot;So if there is a crate or library doing that work, I&#x27;m going to use it. I&#x27;m not going to implement it [myself].&quot;<p>Precisely. Where does this &quot;certainty&quot; come from then?<p>&gt; He is thinking about &quot;what we are going to leave to the next generation&quot;.<p>At this rate, a complete and total mess, of two slightly incompatible libraries neither of which have any significant features which differentiate it from the other, save for in the imagination of the developers themselves.
评论 #43316154 未加载
jll293 个月前
I wonder what lessons were learned that could benefit others who want to port command line tools from C to Rust, e.g. particular idioms or re-usable functions (error handling, logging, defaults&#x2F;dot-file management, command line option parsing).<p>There was a book called &quot;Dr. Dobb&#x27;s C-tools&quot;, which had the commented source code of a C compiler, assembler, linker and std library, and it greatly benefitted me to go beyond K&amp;R&#x27;s book towards understand the idioms of C programing.
malkia3 个月前
Is Rust (llvm?) supported on all platforms Linux targets?
评论 #43312674 未加载
评论 #43312837 未加载
评论 #43312609 未加载
shmerl3 个月前
Ripgrep should be included in all distros by default.
评论 #43312445 未加载
评论 #43312472 未加载
评论 #43312871 未加载
1vuio0pswjnm73 个月前
Memory management programming errors is not a problem I am having with &quot;essential Linux packages&quot;. I use a custom userland and rely on busybox and toybox for most basic utilities. However, the size and resource requirements of a Rust toolchain and endless dependencies might introduce new problems for me when compiling essential Linux packages.
greenheadedduck3 个月前
I wonder how linux devs feel about the rewrite in Rust. I mean surly loads of them have decades of experience in C, and Rust seems like such a different beast. Can any C developers provide insight, how is this transition?
评论 #43313847 未加载
评论 #43312891 未加载
saurik3 个月前
A big reason the GNU utilities were game changing is not because of their existence, or their functionality, but because of their license... a license which, in no small part, is what not merely motivated but then allowed for their continued existence and functionality: a tit-for-tat, sharing is caring, we&#x27;re all in this together, fighting for the users approach to software development, one which ensures that no one is going to embrace and extend your software for use in their platform to lock people out of participation (whether directly or indirectly) in control over the hardware they own.<p>It just really really sucks that people are thereby allocating a ton of effort into reimplementing these tools--putting good effort behind a project that even has a good reason to exist (memory safety), even if (as I&#x27;ll poke at later in this comment) that apparently is explicitly not the reason they are working on this (which shocked me)--with the goal of being &quot;bug for bug compatible&quot; with the upstream copies from the GNU Foundation while carefully ignoring the #1 most important integration (as this affects how the software fits into the whole) test: &quot;is this software &#x27;free&#x27; as in freedom?&quot;.<p>Of course, they claim that this is some kind of unproductive waste of time &quot;debate&quot;, as if the license is the least important part of the software and doesn&#x27;t matter, and I think some people want to take this narrative. Regardless, whether or not we agree with this--a position that feels a lot like &quot;politics don&#x27;t matter and are a waste of time, so stop voicing your concerns&quot;--that&#x27;s not what&#x27;s going on here: if you look a bit deeper, this project actually cares deeply about its license, and is going out of its way to choose the license it is using, ignore complaints, and avoid ending up GPL.<p><a href="https:&#x2F;&#x2F;www.youtube.com&#x2F;watch?v=5qTyyMyU2hQ" rel="nofollow">https:&#x2F;&#x2F;www.youtube.com&#x2F;watch?v=5qTyyMyU2hQ</a><p>In an interview with FOSS Weekly, Sylvestre Ledru (the main developer, who curiously has a background working on Debian and Firefox, before ending up getting seduced by the clang&#x2F;LLVM ecosystem), firmly states &quot;it is not about security&quot;, focusing only on an interest in learning himself how the full stack of tools function and preparing for a future where new developers don&#x27;t actually know enough C to contribute; this might seem to fit into the earlier narrative that the license doesn&#x27;t really matter, which he later restates himself &quot;I don&#x27;t care that much, as long as it is OSI compliant&quot;.<p>This topic comes up multiple times later in the interview, and Steven sticks to his framing that he doesn&#x27;t care about the license, that this debate is a waste of time, and that he tries to avoid discussing it as it is &quot;more philosophical than technical&quot;. Of course, this isn&#x27;t preventing him from discussing it ;P... this is clearly a big issue that people have with this project, it is one that comes up in most discussions of the project, and--if it really didn&#x27;t matter, and it really weren&#x27;t a big deal--you would thereby expect that he&#x27;d just change it, to avoid having to discuss it again...<p>...only, in this interview--in no small part from the interviewer slowly leaking part of their pre-interview discussion to cause the topic to keep coming back up--we learn just how much this developer <i>does</i> seem to care about the license, as, to keep it all as MIT, he&#x27;s having to avoid looking at the original implementation, in an attempt to avoid accidentally letting his code get infected by GPL, to support some users of the project who actively choose to use this reimplementation to avoid GPL compliance (the example we are given--by the interviewer outing it, not him--is &quot;car manufacturers&quot;).<p>As someone who works in security but finds it demoralizing how often security is used as an excuse for what ends up being an effort to lock users out of a platform due to what is merely some supposedly-accidental property of the effort--including one time I was in a hearing with the US Copyright Office, sitting next to a rep from General Motors who was there to argue that we shouldn&#x27;t be allowed to jailbreak a &quot;portable all-purpose mobile computing device&quot; because that might include a car (lol)--I found this back&#x2F;forth in the comments forum on the website for this interview worth reading:<p><a href="https:&#x2F;&#x2F;hackaday.com&#x2F;2024&#x2F;07&#x2F;17&#x2F;floss-weekly-episode-792-rust-coreutils&#x2F;" rel="nofollow">https:&#x2F;&#x2F;hackaday.com&#x2F;2024&#x2F;07&#x2F;17&#x2F;floss-weekly-episode-792-rus...</a><p>&lt;AgainAgain&gt; the goal is to “rewrite it in x” is to move everything to permissive liscenses. then lock future changes away. just like every thing else “security” is used as pretext.<p>&lt;Jonathan Bennett&gt; We chatted a bit about exactly that. They make no claim that this effort is for security, and freely admitted that some of their users are doing so precisely because it’s MIT and not GPL. So… Yes, but actually no.<p>&lt;Thovte&gt; That sounds like yes, but actually, yes. No?
评论 #43319118 未加载