LWN: Comments on "The Rust for Linux project" https://lwn.net/Articles/869145/ This is a special feed containing comments posted to the individual LWN article titled "The Rust for Linux project". en-us Fri, 10 Oct 2025 22:37:13 +0000 Fri, 10 Oct 2025 22:37:13 +0000 https://www.rssboard.org/rss-specification lwn@lwn.net The Rust for Linux project https://lwn.net/Articles/871646/ https://lwn.net/Articles/871646/ neilbrown <div class="FormattedComment"> <font class="QuotedText">&gt; In any busy project, maintainers tend to operate at 100+% of their capacity. </font><br> <p> Then they need to delegate. Or abdicate.<br> Such behaviour is not good for the mental health of the maintainer or the long term health of the project. Just don&#x27;t do it.<br> If you stop, that creates a vacuum. Vacuums tend to get filled.<br> <p> </div> Sat, 02 Oct 2021 21:40:37 +0000 The Rust for Linux project https://lwn.net/Articles/871603/ https://lwn.net/Articles/871603/ bfields <blockquote>In any busy project, maintainers tend to operate at 100+% of their capacity. Whenever they need to learn something new, that effort is taken away from their "usual" activities (which are possibly the activities that they get paid for).</blockquote> <p>Compared to the stuff I'm usually fighting to swap in (how does the dcache work again?), I feel like a new language isn't too bad. They're well-documented. They usually share a lot with other languages. The basics you need to get started usually just aren't that complicated. Fri, 01 Oct 2021 20:27:50 +0000 The Rust for Linux project https://lwn.net/Articles/871185/ https://lwn.net/Articles/871185/ Wol <div class="FormattedComment"> As someone who&#x27;s currently being paid to &quot;learn something new&quot;, it&#x27;s painful!<br> <p> I&#x27;m now working with Oracle rather than Pick, so switching from ENGLISH to SQL is horrible. SQL is just so much more convoluted, slow, horrendous ... (and I&#x27;ve just managed to speed up a query from 10 mins to 2, just by thinking hard about how it was written. The Pick version would probably have taken one minute as the first draft!).<br> <p> Then there&#x27;s learning VBA. Okay, I know assorted programming languages so this isn&#x27;t so bad ...<br> <p> But it gets wearing when pretty much everything you want to do results in a google query for &quot;what&#x27;s the syntax for doing XYZ?&quot;. And working remotely, I can&#x27;t even easily ask my co-workers ...<br> <p> Cheers,<br> Wol<br> </div> Wed, 29 Sep 2021 11:22:16 +0000 The Rust for Linux project https://lwn.net/Articles/871179/ https://lwn.net/Articles/871179/ lacos <div class="FormattedComment"> <font class="QuotedText">&gt; Is it a principle of Linux development that &quot;kernel maintainers shall not be required to learn anything new&quot;?</font><br> <p> In any busy project, maintainers tend to operate at 100+% of their capacity. Whenever they need to learn something new, that effort is taken away from their &quot;usual&quot; activities (which are possibly the activities that they get paid for). Obviously they keep learning new things incrementally, but new material that&#x27;s intrusive and has a steep learning curve (= late RoI) must be a different sell.<br> <p> <font class="QuotedText">&gt; I guess the problem is that those changes have been incremental but &quot;learn Rust&quot; is not.</font><br> <p> IMO: exactly so.<br> </div> Wed, 29 Sep 2021 10:20:46 +0000 The Rust for Linux project https://lwn.net/Articles/870579/ https://lwn.net/Articles/870579/ mathstuf <div class="FormattedComment"> My gut feeling is that it is more around figuring out what the optimizer can help out with. Rust can probably optimize iterator method chains far better than C&#x27;s loops, but at that point, you&#x27;re also fiddling with details that affect the inline heuristic engine and other such details that vary between compiler implementations and versions of the same compiler, so even there I&#x27;d think that &quot;what my specific compiler does&quot; may not be suitable because the optimization could fall on the other side of the line in the next release too.<br> </div> Mon, 27 Sep 2021 13:06:52 +0000 The Rust for Linux project https://lwn.net/Articles/870529/ https://lwn.net/Articles/870529/ marcH <div class="FormattedComment"> For small and trivial pieces of C maybe (I wrote &quot;non-trivial&quot;). Are the equivalent parts in Rust harder to predict and if so why? Interesting question.<br> </div> Sun, 26 Sep 2021 08:08:25 +0000 The Rust for Linux project https://lwn.net/Articles/870368/ https://lwn.net/Articles/870368/ error27 <div class="FormattedComment"> People might surprise you.<br> <p> Some of the kernel is written in assembly. But there are definitely parts which are written in C but the author has the assembly in mind and reviews the assembly to verify.<br> </div> Fri, 24 Sep 2021 14:37:48 +0000 The Rust for Linux project https://lwn.net/Articles/870081/ https://lwn.net/Articles/870081/ marcH <div class="FormattedComment"> <font class="QuotedText">&gt; For me, screwing up a review in C results in bugs, screwing up a review in Rust results in technical debt, and sometimes I&#x27;m not sure which one is worse.</font><br> <p> Define &quot;worse&quot;, on which axis?<br> <p> Debugging undefined behaviors and race conditions or refactoring existing code? I have my preference...<br> </div> Thu, 23 Sep 2021 04:54:13 +0000 The Rust for Linux project https://lwn.net/Articles/870080/ https://lwn.net/Articles/870080/ marcH <div class="FormattedComment"> <font class="QuotedText">&gt; It&#x27;s somewhat low-level like C but, depending on the code, it might be less easy for developers to predict what the resulting assembly code will look like.</font><br> <p> I really doubt anyone can predict the assembly code produced from any non-trivial piece of C unless they turn off optimizations.<br> <p> <a href="https://queue.acm.org/detail.cfm?id=3212479">https://queue.acm.org/detail.cfm?id=3212479</a> &quot;C is not a low-level language&quot;, etc.<br> </div> Thu, 23 Sep 2021 04:15:53 +0000 The Rust for Linux project https://lwn.net/Articles/870079/ https://lwn.net/Articles/870079/ marcH <div class="FormattedComment"> I think the question is: are they worth repeating?<br> </div> Thu, 23 Sep 2021 04:11:03 +0000 Architecture support https://lwn.net/Articles/869896/ https://lwn.net/Articles/869896/ flussence <div class="FormattedComment"> I predict that the world won&#x27;t suddenly end once it&#x27;s in... and the ones complaining loudest will probably go on for some time as if it still wasn&#x27;t.<br> <p> Most old/exotic platforms aren&#x27;t plug-and-play anyway; even if every new peripheral and PCIe card going forward had a pure-Rust driver it&#x27;s unlikely to affect anyone on m68k, mips, alpha etc.<br> <p> (The kernel&#x27;s already got plenty of platform-limited compiler-dependent stuff anyway: LLVM LTO and GCC hardening plugins come to mind - those two are even mutually exclusive!)<br> </div> Tue, 21 Sep 2021 06:00:23 +0000 The Rust for Linux project https://lwn.net/Articles/869843/ https://lwn.net/Articles/869843/ moltonel <div class="FormattedComment"> <font class="QuotedText">&gt; For me, screwing up a review in C results in bugs, screwing up a review in Rust results in technical debt</font><br> <p> I understand the fear, but it doesn&#x27;t match my experience.<br> <p> First the most obvious: paying technical debt (aka refactoring) is easier in Rust, because an API change will be noticed by the compiler in all callers, whereas in C many would be wrongly ignored. I rarely get the &quot;needs a refactor but I&#x27;m too afraid to break things so I&#x27;ll leave it&quot; feeling with Rust.<br> <p> Second, Rust helps making APIs that are harder to misuse, actively fighting technical debt. That&#x27;s what you encountered when you realized you needed to throw away your first version(s). You probably should throw away your first C version too, but the compiler and base APIs don&#x27;t tell you that. In a way, rustc is your first reviewer, making the human reviewer&#x27;s job simpler. It might cause some anger when you&#x27;re still learning that API or Rust itself, but it seems worth it.<br> </div> Mon, 20 Sep 2021 15:17:13 +0000 How will cooperation of rust-knowing and not-rust-knowing maintainers look like? https://lwn.net/Articles/869761/ https://lwn.net/Articles/869761/ broonie <div class="FormattedComment"> Right, and especially drivers needing some new subsystem improvements to cope with some new feature or usage pattern that the hardware has - this is especially true for things not on standardised buses (or not entirely) where it’s much easier for hardware to do new things. <br> </div> Sat, 18 Sep 2021 18:32:53 +0000 The Rust for Linux project https://lwn.net/Articles/869702/ https://lwn.net/Articles/869702/ federico3 <div class="FormattedComment"> It does not. Nim would have been a better choice.<br> </div> Sat, 18 Sep 2021 11:22:49 +0000 The Rust for Linux project https://lwn.net/Articles/869678/ https://lwn.net/Articles/869678/ laarmen <div class="FormattedComment"> IMO this comes mostly from the fact that the bindings expose in a formal way some assumptions that are only informally known in the C codebase. I agree those are *really* painful to read and review (as they are to write...).<br> <p> However, I often find pure Rust code patches easier to review than pure C patches, assuming knowledge of the underlying code base, as Rust allows for stronger local reasoning. If the patch introduces a call looking like foo(&amp;my_struct), Rust tells me that the contents of my_struct won&#x27;t change (barring interior mutability) whereas, seeing the exact same call in C, I&#x27;ll need to know the particulars of foo() in order to judge the soundness of further use of my_struct.<br> </div> Sat, 18 Sep 2021 09:00:17 +0000 How will cooperation of rust-knowing and not-rust-knowing maintainers look like? https://lwn.net/Articles/869674/ https://lwn.net/Articles/869674/ matthias <div class="FormattedComment"> It is not the driver requiring changes to the subsystems that gray wolf and broonie are talking about, but the other direction. I.e., a change to the subsystem that requires all users to be adapted. In this case the maintainer of the subsystem has to adapt the rust wrapper for the C API.<br> </div> Sat, 18 Sep 2021 08:24:26 +0000 The Rust for Linux project https://lwn.net/Articles/869652/ https://lwn.net/Articles/869652/ pbonzini <div class="FormattedComment"> I tihnk this might apply more when Rust is brought into well-established codebases, that already have a certain complexity (both essential and accidental) baked in. Idiomatic Rust bindings pile more complexity on top.<br> </div> Sat, 18 Sep 2021 03:52:44 +0000 The Rust for Linux project https://lwn.net/Articles/869634/ https://lwn.net/Articles/869634/ roc <div class="FormattedComment"> TBH I find this considerably worse in C++, because there are a lot more possible ways to do things in C++.<br> <p> Seems to me your concern applies mainly to green-field development in Rust. Actual *maintenance* presents these questions less often, and when it does the solutions will be constrained by the patterns already set up.<br> <p> But it would be interesting to collect more specific examples and see what can be done to provide guidance. I personally don&#x27;t feel this burden myself. Maybe it&#x27;s because I&#x27;ve been writing Rust code for five years, but even when I look at the code I wrote in the first year I think the design generally holds up.<br> </div> Sat, 18 Sep 2021 00:06:42 +0000 The Rust for Linux project https://lwn.net/Articles/869628/ https://lwn.net/Articles/869628/ st33med <div class="FormattedComment"> It took me a bit to realize what you were getting at with &#x27;technical debt&#x27; but I think I get it. If I understand you correctly, you&#x27;re worried that the increased features adds to the complexity and thus costs later on to develop on top of a Rust library or rewrite it. <br> <p> In C, I would argue many things are presented as &#x27;overly simplified&#x27; with hidden behaviors that many developers may not consider until it bites you with undefined behavior. The typing system is not very strict which gives many footguns, there&#x27;s practically no such thing as memory safety, etc. I think you know all this, and you&#x27;re right that Rust adds features to be safe, and programming under Rust with this subset takes some time to think about how you want a program to function. <br> <p> What I&#x27;m getting at is that it takes time and experience with Rust to be able to formulate an effective and friendly program structure, just like many other programming languages. You wouldn&#x27;t be expected to pick up Haskell and know exactly the &#x27;right&#x27; way to make a web server application, and Rust is no different. There&#x27;s also never one obvious way to construct a program; sometimes you do need to scrap your current code and start over, regardless of the language used, and that happens less as you learn about the tools you are using. <br> <p> The additional features of Rust do add more to consider in your design and may add to technical debt later on, but with experience, you gain insight into how your program synergizes with the Rust model and it becomes less of a burden. Likewise, the clearly marked unsafe portions of code, enforced typing model, and lack of undefined behavior remove a lot of time reviewing code and running static checkers against your program, of which C++ does not really remove despite being more &#x27;feature-rich&#x27; than C and containing things like templates that Rust doesn&#x27;t have. <br> </div> Fri, 17 Sep 2021 23:39:38 +0000 Recordings https://lwn.net/Articles/869604/ https://lwn.net/Articles/869604/ ojeda <div class="FormattedComment"> (For the other talks, I recommend attending the &quot;Rust Monday&quot; at LPC -- some of the content will be similar).<br> </div> Fri, 17 Sep 2021 19:32:55 +0000 How will cooperation of rust-knowing and not-rust-knowing maintainers look like? https://lwn.net/Articles/869574/ https://lwn.net/Articles/869574/ ojeda <div class="FormattedComment"> <font class="QuotedText">&gt; These are really obvious questions, so I&#x27;ve likely just overlooked it already being discussed somewhere.</font><br> <p> No, I don&#x27;t think you overlooked :) We have talked about these points a few times, but they are still quite open. At LPC next week we will try to have this discussion with more kernel maintainers.<br> </div> Fri, 17 Sep 2021 19:00:46 +0000 How will cooperation of rust-knowing and not-rust-knowing maintainers look like? https://lwn.net/Articles/869566/ https://lwn.net/Articles/869566/ ojeda <div class="FormattedComment"> <font class="QuotedText">&gt; No, they don&#x27;t. At the moment, the Rust side is a client of the C APIs, and thus the modifications to the C side are minimal.</font><br> <p> Ignore this sentence -- I thought you were referring to the Rust changes. For kernel changes in general, yes, some of them change different places in the kernel (the second part of the comment addresses that).<br> </div> Fri, 17 Sep 2021 16:58:15 +0000 The Rust for Linux project https://lwn.net/Articles/869564/ https://lwn.net/Articles/869564/ pbonzini <div class="FormattedComment"> It&#x27;s not about the correctness, it&#x27;s the complexity. For me reviewing Rust means constantly asking myself &quot;is this the right way to do it, or will it become excessive complexity and technical debt in the future&quot;. For me, screwing up a review in C results in bugs, screwing up a review in Rust results in technical debt, and sometimes I&#x27;m not sure which one is worse.<br> <p> Almost every time I wrote complex code in Rust, I ended up throwing away the first version because I went down the wrong way to define types, establish ownership policies, pick what was hardcoded vs. what was abstracted. And it took a while to realize that, possibly only after using the library in anger. That is what I found even worse in Rust than in C++.<br> </div> Fri, 17 Sep 2021 16:42:47 +0000 How will cooperation of rust-knowing and not-rust-knowing maintainers look like? https://lwn.net/Articles/869560/ https://lwn.net/Articles/869560/ ojeda <div class="FormattedComment"> <font class="QuotedText">&gt; my understanding is that lot (some?) of the changes require some modifications even in other subsystem</font><br> <p> No, they don&#x27;t. At the moment, the Rust side is a client of the C APIs, and thus the modifications to the C side are minimal.<br> <p> The problem is that, even in this case, if you are doing subsystem or tree-wide changes that change C APIs, and they happen to be used by Rust code, then you would also need to update those.<br> <p> This is what some kernel maintainers/developers that regularly do those kind of changes are worried about -- they would need to learn Rust fairly soon, which may put a big burden on them. Thus we may need to have a way to smooth things for them (e.g. relaxing the rules, helping them write or review the Rust side of the code, etc.).<br> </div> Fri, 17 Sep 2021 16:41:33 +0000 The Rust for Linux project https://lwn.net/Articles/869555/ https://lwn.net/Articles/869555/ moltonel <div class="FormattedComment"> Rust does take time to become proficient in (though less than C++, and even C depending on how high you place the &quot;proficient&quot; bar), but Rust is &quot;a language where you get the hangover first&quot; and the giddy state afterwards. To me, reviewing Rust incurs a lower mental overhead thanks to the lack of UB and the much more informative type system.<br> </div> Fri, 17 Sep 2021 16:16:58 +0000 Recordings https://lwn.net/Articles/869559/ https://lwn.net/Articles/869559/ ojeda <div class="FormattedComment"> Indeed, we will post the invited talks (probably after LPC).<br> </div> Fri, 17 Sep 2021 16:06:46 +0000 How will cooperation of rust-knowing and not-rust-knowing maintainers look like? https://lwn.net/Articles/869556/ https://lwn.net/Articles/869556/ pbonzini <div class="FormattedComment"> I understand, the simplest case being a SCSI adapter sitting on a PCI bus. Such a driver obviously would need Rust bindings to both subsystems. But it&#x27;s rare for drivers to &quot;require some modifications even in other subsystems&quot; (quoting the message I replied to). Usually driver changes are fairly self-contained.<br> </div> Fri, 17 Sep 2021 15:56:01 +0000 How will cooperation of rust-knowing and not-rust-knowing maintainers look like? https://lwn.net/Articles/869531/ https://lwn.net/Articles/869531/ broonie <div class="FormattedComment"> You&#x27;d be surprised how many drivers interact with multiple subsystems - for example it&#x27;s very common to consume multiple APIs for resources like control bus, clocks, regulators and GPIOs while also offering another API to their own users. The whole thing about drivers not needing to interact with much is very much an assumption based on server type systems.<br> </div> Fri, 17 Sep 2021 15:21:19 +0000 Recordings https://lwn.net/Articles/869485/ https://lwn.net/Articles/869485/ corbet My understanding is that recordings for a subset of the talks will be posted. Fri, 17 Sep 2021 13:26:25 +0000 How will cooperation of rust-knowing and not-rust-knowing maintainers look like? https://lwn.net/Articles/869474/ https://lwn.net/Articles/869474/ pbonzini <div class="FormattedComment"> There are some subsystems which are very central and would be &quot;forcibly&quot; made part of the Rust effort, because their API would have Rust-to-C bindings. Changing APIs in those subsystems would require changes to the bindings. This is for example the case for VFS, where Rust drivers may have to define file_operations (hence my question to Miguel, that the article refers to).<br> <p> But apart from that, for something such as drivers (which are the initial focus of the project), the cases of patches affecting multiple subsystems are quite rare.<br> </div> Fri, 17 Sep 2021 09:47:21 +0000 The Rust for Linux project https://lwn.net/Articles/869473/ https://lwn.net/Articles/869473/ pbonzini <div class="FormattedComment"> I think the problem is the magnitude of the change. Being proficient in Rust is not an easy skill to achieve.<br> <p> As a maintainer (not as a kernel maintainer), my main worry in adopting Rust is: will I be able to review code effectively? will I correctly identify neverending sources of future technical debt and stop them from entering the project?<br> <p> I like the language, but despite the extra safety guarantees offered by the compiler, I find Rust code to be very hard to review, even more so than C++.<br> </div> Fri, 17 Sep 2021 09:42:46 +0000 How will cooperation of rust-knowing and not-rust-knowing maintainers look like? https://lwn.net/Articles/869471/ https://lwn.net/Articles/869471/ gray_-_wolf <div class="FormattedComment"> Hm, I still don&#x27;t understand how the &quot;at first work only with subsystems/maintainers that are interested&quot; is supposed to work. Admittedly, I do not know much about linux development, but from the articles and comments on this site my understanding is that lot (some?) of the changes require some modifications even in other subsystems, even if your main patch is focused on one.<br> <p> If the other subsystem is (partially) in rust, which you do not know, how would that be handled? If some parts of your patch touch some rust code, but goes via a tree of a maintainers that does not know rust, how should that be handled?<br> <p> Just to make it clear, I really am just trying to understand how this will (would?) work. These are really obvious questions, so I&#x27;ve likely just overlooked it already being discussed somewhere.<br> </div> Fri, 17 Sep 2021 09:28:36 +0000 The Rust for Linux project https://lwn.net/Articles/869465/ https://lwn.net/Articles/869465/ beagnach <div class="FormattedComment"> This is a challenging, multi-year project. I think we can reasonably expect the talking points to remain much the same for months at a time. <br> </div> Fri, 17 Sep 2021 07:40:01 +0000 The Rust for Linux project https://lwn.net/Articles/869463/ https://lwn.net/Articles/869463/ kaviraj <div class="FormattedComment"> Is the conference recordings available for public? Couldn’t find it in the website <a href="https://kangrejos.com/">https://kangrejos.com/</a><br> </div> Fri, 17 Sep 2021 06:45:17 +0000 The Rust for Linux project https://lwn.net/Articles/869457/ https://lwn.net/Articles/869457/ atnot <div class="FormattedComment"> To be clear, I&#x27;m very much in favor of rust in the kernel, I just felt a strong deja vu from the discussion. It sounds like that was perhaps just some deliberate retreading of ground for the first day though, I haven&#x27;t watched the others yet.<br> </div> Fri, 17 Sep 2021 02:27:38 +0000 The Rust for Linux project https://lwn.net/Articles/869451/ https://lwn.net/Articles/869451/ roc <div class="FormattedComment"> Is it a principle of Linux development that &quot;kernel maintainers shall not be required to learn anything new&quot;? Presumably over time kernel devs have had to learn new rules for writing C code, as the kernel C dialect has moved away from standard C and issues like memory ordering have become important. I guess the problem is that those changes have been incremental but &quot;learn Rust&quot; is not. That&#x27;s certainly a valid issue.<br> </div> Thu, 16 Sep 2021 23:47:52 +0000 Architecture support https://lwn.net/Articles/869447/ https://lwn.net/Articles/869447/ Wol <div class="FormattedComment"> Whoops, sorry Jon, I know you know that, but this seems to be a negative meme that too many people jump on.<br> <p> Cheers,<br> Wol<br> </div> Thu, 16 Sep 2021 22:39:57 +0000 Architecture support https://lwn.net/Articles/869432/ https://lwn.net/Articles/869432/ Wol <div class="FormattedComment"> Does it NEED to work on all the platforms?<br> <p> If they start off writing code that will only be run on supported platforms, it doesn&#x27;t need to run on the others.<br> <p> If there&#x27;s a &quot;rust to C&quot; translator (I believe there is), then they can use that for unsupported platforms.<br> <p> And as rust gains a foothold, it will provide pressure for the list of supported platforms to grow.<br> <p> These things don&#x27;t burst on the scene fully-fledged - linux didn&#x27;t, why should rust?<br> <p> What&#x27;s that saying? If you don&#x27;t evolve you die? Maybe rust is the next evolution for linux? Maybe it isn&#x27;t, but don&#x27;t put artificial obstacles in the way - you should know linux well enough to know it will evolve around and past you if you try to set up a road-block.<br> <p> Cheers,<br> Wol<br> </div> Thu, 16 Sep 2021 22:38:27 +0000 The Rust for Linux project https://lwn.net/Articles/869429/ https://lwn.net/Articles/869429/ tux3 <div class="FormattedComment"> Thay may indicate that no one has given them cause to change their talking points.<br> <p> I imagine there&#x27;s a lot of scaffolding, core code, and example drivers to write. Perhaps that&#x27;s why it takes more than a couple months for them to move to the next step.<br> <p> If you feel they should abandon their efforts, or not organize conferences to talk about the project&#x27;s status, you should certainly want to share a good reason why. I think everyone can agree that we&#x27;d all like to hear novel discussion points.<br> </div> Thu, 16 Sep 2021 22:17:56 +0000 Architecture support https://lwn.net/Articles/869414/ https://lwn.net/Articles/869414/ corbet Rust does not yet work on all of the architectures supported by the Linux kernel; this was discussed a bit more in the later days (stay tuned). That's recognized as a problem and is one of the reasons why people are looking forward to the native GCC Rust compiler. Thu, 16 Sep 2021 18:29:50 +0000