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

科技回声

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

GitHubTwitter

首页

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

资源链接

HackerNews API原版 HackerNewsNext.js

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

Committing to Rust for Kernel Code

203 点作者 wofo超过 1 年前

9 条评论

ndesaulniers超过 1 年前
&gt; Torvalds answered that, while he used to find problems in the LLVM Clang compiler, now he&#x27;s more likely to find problems with GCC instead; he now builds with Clang.<p><a href="https:&#x2F;&#x2F;github.com&#x2F;ClangBuiltLinux&#x2F;linux&#x2F;issues">https:&#x2F;&#x2F;github.com&#x2F;ClangBuiltLinux&#x2F;linux&#x2F;issues</a> is our bug tracker for known issues (a few are tracked in llvm&#x27;s issue tracker). Bug reporters and future kernel hackers wanted!<p>As I mentioned on mastodon, there&#x27;s lots of bugs still to be fixed everywhere, but even if we don&#x27;t fix them, providing competition in the toolchain space has been worth it to users.
评论 #38396436 未加载
评论 #38396756 未加载
thesuperbigfrog超过 1 年前
It is exciting to see Rust start to replace legacy C code in the Linux kernel. It is only the beginning, but everything seems to point to the start of a gradual migration. Reading about Asahi Lina&#x27;s experience doing GPU driver development was intriguing:<p><a href="https:&#x2F;&#x2F;threadreaderapp.com&#x2F;thread&#x2F;1577667445719912450.html" rel="nofollow noreferrer">https:&#x2F;&#x2F;threadreaderapp.com&#x2F;thread&#x2F;1577667445719912450.html</a><p>At $WORK we are converting a graphics processing application written in C to Rust and the experience has been similarly enlightening.<p>Learning Rust has been a process, but the dividends are real and exciting.
评论 #38395604 未加载
评论 #38395600 未加载
janalsncm超过 1 年前
I do ML professionally, but for performance bottleneck data processing code I’ve converted a lot of scripts to Rust. It’s been a joy even if I can’t say I’m proficient. The combination of GPT4 and the Rust compiler really help to smooth out the learning curve.<p>Some of my python scripts which used to take 24 hours to process data now can finish in under an hour. It’s like magic. Granted theres a development cost so I don’t convert everything but it almost feels like cheating watching it go.<p>Another thing, it seems that the strictness of the language really cuts down on nasty runtime issues and silent bugs. Rust forces you to state explicitly what you want to do.
xyst超过 1 年前
Personally, I am very excited. Writing code in Rust is such a pleasure after years in corporate Java&#x2F;C# shops.<p>Hope to contribute patches in rust to kernel in the near future!
评论 #38396239 未加载
__turbobrew__超过 1 年前
I wonder what would be worse:<p>1. Sticking with C for the rest of eternity for the linux kernel and accepting the baggage which comes with that<p>2. Migrating to rust and accepting the regressions which will inevitably appear as code is rewritten
评论 #38396138 未加载
评论 #38402620 未加载
评论 #38402608 未加载
mustache_kimono超过 1 年前
&gt; Linus Torvalds said that he was seeing a divide between the filesystem and driver maintainers. Developers on the filesystem side tend to be more conservative, while the driver world &quot;is the wild west&quot;. Driver authors tend not to understand concurrency, he said, and a lot of the code there is broken and unfixable. So it is unsurprising that there is interest in bringing in a language that better supports the writing of correct and safe code.<p>&gt; Torvalds answered that, while he used to find problems in the LLVM Clang compiler, now he&#x27;s more likely to find problems with GCC instead; he now builds with Clang.<p>&gt; At the conclusion, Torvalds pointed out that there have been problems over the years with GCC changes breaking the kernel; the same will surely happen with Rust, but it will be the same thing in the end.<p>Based Linus Torvalds.
askl超过 1 年前
duplicate of <a href="https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=38381066">https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=38381066</a>
Laaas超过 1 年前
The issue with Rust is the horrible compile times.<p>I actively avoid Rust projects because they take too long to compile.<p>I wish rustc had an option for disabling monomorphization, a true -Os option.
评论 #38395844 未加载
评论 #38395488 未加载
评论 #38395654 未加载
评论 #38395395 未加载
评论 #38396200 未加载
评论 #38397150 未加载
评论 #38395489 未加载
评论 #38395433 未加载
评论 #38395620 未加载
评论 #38395409 未加载
评论 #38397837 未加载
ziandrome22超过 1 年前
I remain unconvinced about the viability of Rust for many kinds of systems programming. I&#x27;m not sure how I feel about it in the Linux kernel, although I suppose it doesn&#x27;t matter since it&#x27;s likely to not penetrate very deeply so to speak.<p>If there are any Rust experts around...what am I missing? The way I see it, Rust is still fundamentally designed to work at a higher level of abstraction than C, and is still mostly dependent on C (even C++ really, due to LLVM&#x2F;Clang). And bare metal or &quot;first compiler&quot; support for bare metal doesn&#x27;t seem like it&#x27;s really intended to be a first class use case. At least that&#x27;s my impression of the ecosystem from the little time I&#x27;ve had to play around with it.<p>Is this mostly just a thing to get more young people interested in kernel development...allowing them to start out in less important areas and in a language they are passionate about? Or is this a serious proposal about the future of operating systems and other low level infrastructure code? Do you just program everything in unsafe mode? What about runtimes?<p>It seems to me that Rust isn&#x27;t even really intended to compete with C for the use cases in which C is dominant in 2023. Every indication is that for &quot;serious Rust in production programming&quot; it&#x27;s mostly a C++ crowd. Whereas for myself and most of the C programmers I know, Zig has sort of filled that similar space and seems to take the concerns of C programmers more seriously and the team has an attitude more in line with the C culture than the Rust team does. I could spend hours writing examples of this but it&#x27;s even apparent in the way the Zig team has handled its relationship with LLVM, where they seem very serious about trying to not accept it as fundamental to their language and eventually even eliminate the dependency on the C++ code...with Rust it doesn&#x27;t seem like this is even on the minds of most of the users. It&#x27;s purely a dependency for them and that isn&#x27;t seen as being fundamentally at odds with the intended use cases. That is totally okay...but it ain&#x27;t the C culture if we are to accept that such a thing exists.
评论 #38396308 未加载
评论 #38396598 未加载
评论 #38396355 未加载
评论 #38396449 未加载
评论 #38396647 未加载
评论 #38396149 未加载
评论 #38397464 未加载
评论 #38396474 未加载
评论 #38397270 未加载
评论 #38396595 未加载
评论 #38397867 未加载
评论 #38396165 未加载
评论 #38396143 未加载
评论 #38402702 未加载
评论 #38396117 未加载
评论 #38400057 未加载
评论 #38397399 未加载
评论 #38396555 未加载
评论 #38397656 未加载