LWN: Comments on "Supporting Linux kernel development in Rust" https://lwn.net/Articles/829858/ This is a special feed containing comments posted to the individual LWN article titled "Supporting Linux kernel development in Rust". en-us Thu, 30 Oct 2025 09:15:54 +0000 Thu, 30 Oct 2025 09:15:54 +0000 https://www.rssboard.org/rss-specification lwn@lwn.net MIR is a wiser choice https://lwn.net/Articles/831345/ https://lwn.net/Articles/831345/ nix <div class="FormattedComment"> Firefox 79.0 failed to build with Rust 1.45.x+: <a href="https://bugzilla.mozilla.org/show_bug.cgi?id=1654465">https://bugzilla.mozilla.org/show_bug.cgi?id=1654465</a> (seriously misleading bug title because the failure-to-build wasn&#x27;t clear until halfway down the discussion thread). Now admittedly 1.45 wasn&#x27;t out at the time FF 79 was released, but still it took over a month to backport the relevant patch from ff trunk...<br> <p> This is not what I would describe as a showstopper, though, because it only happens with LTO so it&#x27;s easy to fix by just not using LTO.<br> </div> Sat, 12 Sep 2020 14:53:01 +0000 Supporting Linux kernel development in Rust https://lwn.net/Articles/830904/ https://lwn.net/Articles/830904/ marcH <div class="FormattedComment"> <font class="QuotedText">&gt; There&#x27;s a reason people who talk about how great C++ is always talk about the need to use a limited subset of the language.</font><br> <p> <a href="https://www.google.com/search?q=alex+gaynor+holding+it+wrong">https://www.google.com/search?q=alex+gaynor+holding+it+wrong</a><br> <p> You can write bug-free code in any language. It&#x27;s just orders of magnitude harder with some.<br> </div> Tue, 08 Sep 2020 08:36:36 +0000 Supporting Linux kernel development in Rust https://lwn.net/Articles/830897/ https://lwn.net/Articles/830897/ marcH <div class="FormattedComment"> <font class="QuotedText">&gt; The ubiquitous kmalloc() function, for instance, is defined as __always_inline, meaning that it is inlined into all of its callers and no kmalloc() symbol exists in the kernel symbol table for Rust to link against.</font><br> <p> &quot;Inlining&quot; does not imply &quot;no standalone function&quot;. These are of course related yet different things. There is a number of cases where a standalone function is created even when the calls are inlined. Simple example from <a href="https://gcc.gnu.org/onlinedocs/gcc/Inline.html">https://gcc.gnu.org/onlinedocs/gcc/Inline.html</a> :<br> <p> <font class="QuotedText">&gt; The function must also be compiled as usual if the program refers to its address, because that cannot be inlined.</font><br> <p> Wouldn&#x27;t a reference to the address of kmalloc() be simpler than &quot;defining a kmalloc_for_rust() symbol containing an un-inlined version&quot;?<br> </div> Tue, 08 Sep 2020 05:50:59 +0000 MIR is a wiser choice https://lwn.net/Articles/830792/ https://lwn.net/Articles/830792/ farnz <p><tt>#[!deny(warnings)]</tt> sounds like a failure to communicate inside the build system; at the rustc level, there's a <a href="https://doc.rust-lang.org/beta/rustc/lints/levels.html#capping-lints"><tt>--cap-lints</tt></a> option to turn "deny" into "warn" or "allow". I know Cargo threads that through to dependencies, but right now, there's <a href="https://github.com/rust-lang/cargo/issues/3591">no easy way to supply it to <tt>cargo build</tt>, bar setting the <tt>RUSTFLAGS='-A dead_code'</tt> environment variable</a>. Sun, 06 Sep 2020 19:30:09 +0000 MIR is a wiser choice https://lwn.net/Articles/830773/ https://lwn.net/Articles/830773/ edomaur <div class="FormattedComment"> Ah, yes, I forgot Sealed Rust but it&#x27;s exactly why I meant.<br> </div> Sun, 06 Sep 2020 07:13:44 +0000 Supporting Linux kernel development in Rust https://lwn.net/Articles/830768/ https://lwn.net/Articles/830768/ zlynx <div class="FormattedComment"> Rust and updating code to handle &quot;edge cases&quot; is exactly what is so great about Rust. Yes, you might have to rewrite 300 lines of code to fix that edge case. And it will be done correctly.<br> <p> In my 25 years of experience doing C++ (not always full time) the worst bugs are created by the &quot;quick fixes&quot; where somebody makes &quot;just a small change&quot; which seems to work, but in reality has just created a black hole of undefined behavior where tiny code changes in other parts of the code will destroy the storage used by your dangling pointer/reference to a deallocated temporary std::string. Now with bonus C++11 behavior where it depends on how long the string was.<br> </div> Sun, 06 Sep 2020 03:44:12 +0000 MIR is a wiser choice https://lwn.net/Articles/830766/ https://lwn.net/Articles/830766/ roc <div class="FormattedComment"> Thanks!!!<br> <p> One issue is due to &quot;#![deny(warnings)]&quot;. This is similar to C++, where if you build with -Werror you will break frequently. Libraries need to not use that.<br> <p> One is a build system issue where the requirements for LTO changed.<br> <p> The rest seems to be issues in rust-url but I can&#x27;t see what the actual issues were :-(.<br> </div> Sun, 06 Sep 2020 03:25:00 +0000 Supporting Linux kernel development in Rust https://lwn.net/Articles/830764/ https://lwn.net/Articles/830764/ flussence <div class="FormattedComment"> C is not simple. It only *looks* simple to you because of survivor bias; the worst crap gets filtered out through the kernel&#x27;s multiple layers of review and rejection. The same would be true of Rust code.<br> </div> Sun, 06 Sep 2020 03:18:17 +0000 MIR is a wiser choice https://lwn.net/Articles/830741/ https://lwn.net/Articles/830741/ kenmoffat <div class="FormattedComment"> Mostly, I don&#x27;t have the details - if the current release fails to build with a newer rust then I don&#x27;t have the skills to track it down. In generally, when a package FTBFS I hope to not be on the bleeding edge and to find that soemone has already solved the problem. But finding relevant search results is increasingly problematic. <br> <p> But for seamonkey I eventually discovered they were tracking this and had a series of patches, the bug for tracking current rust versions is at <a href="https://bugzilla.mozilla.org/show_bug.cgi?id=1617782">https://bugzilla.mozilla.org/show_bug.cgi?id=1617782</a> and the first several attachments were needed to enable 2.53.1 to be build with whichever version of rust was current at the time - I hit it in February, it was in March that I found the patches (there was a link from an Arch posting).<br> <p> I think that bug might have details of how the build failed for each item.<br> </div> Sun, 06 Sep 2020 00:19:38 +0000 Supporting Linux kernel development in Rust https://lwn.net/Articles/830740/ https://lwn.net/Articles/830740/ roc <div class="FormattedComment"> Yes, adding Rust or anything not-kernel-C adds cognitive load, so that must be part of the cost-benefit analysis.<br> <p> The cognitive load for Rust is much lower than for C++ though; C++ is a much bigger and hairier language, and demands much more effort from the developer to avoid UB.<br> <p> <font class="QuotedText">&gt; Particularly rust which is quickly becoming a write only language to work around all the edge cases that crop up.</font><br> <p> I have no idea what this is about. I read third-party Rust code a lot. If Rust&#x27;s &quot;edge cases&quot; bother you then C++ must be completely off the table.<br> </div> Sat, 05 Sep 2020 23:38:31 +0000 MIR is a wiser choice https://lwn.net/Articles/830738/ https://lwn.net/Articles/830738/ roc <div class="FormattedComment"> An hour of work spread over two years is insignificant.<br> <p> C++ compilers have backwards incompatibilities and just plain compilation bugs at a similar low rate.<br> </div> Sat, 05 Sep 2020 23:32:29 +0000 MIR is a wiser choice https://lwn.net/Articles/830737/ https://lwn.net/Articles/830737/ roc <div class="FormattedComment"> I&#x27;m actually interested in the details of what backwards-incompatibility you encountered in each case.<br> <p> I&#x27;m aware of a couple of soundness fixes that might possibly have affected you but other than that, I&#x27;m not aware of any backwards-incompatibilities that hit anything real.<br> </div> Sat, 05 Sep 2020 23:28:14 +0000 MIR is a wiser choice https://lwn.net/Articles/830710/ https://lwn.net/Articles/830710/ kenmoffat <div class="FormattedComment"> Sorry, I managed to reply in the wrong place - currently just above your question.<br> </div> Sat, 05 Sep 2020 09:18:45 +0000 MIR is a wiser choice https://lwn.net/Articles/830707/ https://lwn.net/Articles/830707/ kenmoffat <div class="FormattedComment"> Off the top of my head, various issues in the past year or eighteen<br> months with seamonkey releases, and I think there was one problem with thunderbird. Now that thunderbird is on similar versions to<br> firefox-esr (for full releases) I don&#x27;t expect many new problems with that.<br> <p> For seamonkey the problem was in 2.53.1 when we wanted to move from rustc-1.37.0 to rustc-1.41.0. We want one version of rustc for all the packages in BLFS, so at the moment we are using firefox-esr and rustc-1.42.0 (and the current seamonkey release is fine).<br> <p> </div> Sat, 05 Sep 2020 07:36:46 +0000 Supporting Linux kernel development in Rust https://lwn.net/Articles/830695/ https://lwn.net/Articles/830695/ bored <div class="FormattedComment"> This is maybe the core of the argument, while rust (and C++) both bring things to the table, there is a lot of crossover between the functionality they provide. Which means mostly your just adding additional cognitive load for people who have to maintain the kernel as a whole. Now a developer has to be an expert in not only C and the compiler&#x27;s code generation, but rust as well. The kernel is already got python, bash, make, etc i&#x27;m not sure it really needs another language. Particularly rust which is quickly becoming a write only language to work around all the edge cases that crop up. Maybe in another ~10 years when its has a lot more developer support and has a proven track record. For all we know at this point rust is going to be just another ada/etc.<br> <p> <p> <p> <br> </div> Fri, 04 Sep 2020 23:31:48 +0000 MIR is a wiser choice https://lwn.net/Articles/830662/ https://lwn.net/Articles/830662/ mathstuf <div class="FormattedComment"> Most of my experience with it has been dependencies jumping onto new features once they stabilize. These tend to happen in waves as larger features land. Some of the latest points I&#x27;ve seen:<br> <p> - 2018 edition<br> - byte accesses on primitive types (to_le(), as_bytes(), etc.)<br> - code changes to take advantage of NLL<br> - async/await<br> - feature(doctest)<br> <p> These usually have 3-4 releases between them.<br> <p> If you want to avoid these kinds of things, keep a Cargo.lock and you&#x27;ll stick with versions that continue to work. Very rarely things do get removed in Rust updates, but these are typically soundness issues that can cause problems if they are used improperly. Luckily crater can be used to fix it across the (FOSS) ecosystem pretty easily. Release notes are well-written and short enough that anyone else can read and follow along.<br> </div> Fri, 04 Sep 2020 16:19:19 +0000 Supporting Linux kernel development in Rust https://lwn.net/Articles/830661/ https://lwn.net/Articles/830661/ mathstuf <div class="FormattedComment"> <font class="QuotedText">&gt; Rust code being hard to compile is an *advantage* for maintainers of large projects like the kernel.</font><br> <p> Clarification (since I suspect this is what roc meant): I find Rust code far easier to compile than C or C++. Getting the compiler to accept the code is what is harder :) .<br> </div> Fri, 04 Sep 2020 16:12:45 +0000 MIR is a wiser choice https://lwn.net/Articles/830608/ https://lwn.net/Articles/830608/ tdz <div class="FormattedComment"> A couple of times within four years is already quite a bit.<br> </div> Fri, 04 Sep 2020 13:36:14 +0000 Supporting Linux kernel development in Rust https://lwn.net/Articles/830599/ https://lwn.net/Articles/830599/ roc <div class="FormattedComment"> <font class="QuotedText">&gt; whenever you have two pieces of unsafe code that individually present a &quot;safe&quot; interface, there is a possibility of an interaction that makes the combination unsafe</font><br> <p> The problem in the issue you linked to was JoinGuard assuming safe Rust doesn&#x27;t leak. In fact, safe Rust is allowed to leak. So this problem wasn&#x27;t due to an interaction between unsafe code modules, but because one piece of unsafe code assumed a property of safe Rust code that doesn&#x27;t necessarily hold.<br> <p> This was an understandable mistake in 2015 because then there wasn&#x27;t as clear a picture of what the invariants around safe Rust actually are. The picture is clearer now, although still not fully clear. So maybe in the future some invariants will be clarified that invalidate the assumptions made by some unsafe code --- but even then, there is no general problem of &quot;the possibility of an interaction that makes the combination unsafe&quot;.<br> </div> Fri, 04 Sep 2020 09:30:59 +0000 MIR is a wiser choice https://lwn.net/Articles/830598/ https://lwn.net/Articles/830598/ roc <div class="FormattedComment"> Can you give some examples of Mozilla releases that build with stable Rust but are broken by later Rust releases? I have not seen this more than a couple of times in my project over the last four years.<br> </div> Fri, 04 Sep 2020 09:20:43 +0000 Supporting Linux kernel development in Rust https://lwn.net/Articles/830589/ https://lwn.net/Articles/830589/ farnz <p>Rust has <a href="https://doc.rust-lang.org/std/collections/struct.LinkedList.html">a standard library linked list</a>, and the abstractions for <a href="https://docs.rs/intrusive-collections/0.9.0/intrusive_collections/linked_list/index.html">instrusive double-linked list</a> and <a href="https://docs.rs/intrusive-collections/0.9.0/intrusive_collections/singly_linked_list/index.html">intrusive single-linked list</a> have been written. <p>The reason linked lists are discouraged in Rust apply to C and assembly, too - they are fundamentally all about pointer chasing, and that's the hardest thing for a CPU to perform well at; other data structures are normally what you want, but the emphasis on linked lists in formal education (and in languages with "sufficiently smart" compilers like Haskell) means that people reach for them when they're the wrong choice. Fri, 04 Sep 2020 08:45:17 +0000 Supporting Linux kernel development in Rust https://lwn.net/Articles/830585/ https://lwn.net/Articles/830585/ vegard <div class="FormattedComment"> Just thinking about this some more.<br> <p> What you say sounds &quot;easy&quot; in a way, but is it really possible at all in most cases?<br> <p> The Linux kernel is notorious for its use of intrusive doubly-linked lists, and Rust is notorious for the difficulty/discouragement of linked lists. Surely if it was just a matter of finding a safe abstraction in Rust (i.e. wrapper around unsafe code), Rust would also have easy-to-use linked lists?<br> <p> If I remember correctly, whenever you have two pieces of unsafe code that individually present a &quot;safe&quot; interface, there is a possibility of an interaction that makes the combination unsafe, most famously &lt;<a href="https://github.com/rust-lang/rust/issues/24292">https://github.com/rust-lang/rust/issues/24292</a>&gt;. A whole bunch of people have worked on proving that all these safe abstractions are safe in the presence of each other (i.e. the RustBelt project). Wouldn&#x27;t we need a whole bunch of verification work to make this work for the kernel?<br> </div> Fri, 04 Sep 2020 07:04:56 +0000 MIR is a wiser choice https://lwn.net/Articles/830558/ https://lwn.net/Articles/830558/ roc <div class="FormattedComment"> Ah yes, you&#x27;re right about that domain. I guess you&#x27;re talking about Sealed Rust attempting to meet that need: <a href="https://ferrous-systems.com/blog/sealed-rust-the-pitch">https://ferrous-systems.com/blog/sealed-rust-the-pitch</a><br> </div> Thu, 03 Sep 2020 22:43:57 +0000 MIR is a wiser choice https://lwn.net/Articles/830470/ https://lwn.net/Articles/830470/ njs <div class="FormattedComment"> <font class="QuotedText">&gt; My experience is that what builds now in *released* versions of mozilla or ex-mozilla packages (firefox-esr, thunderbird, seamonkey) is often broken by the second or third next rust release.</font><br> <p> That&#x27;s because those programs manually opt-in to unstable/prototype/still-in-development features: <a rel="nofollow" href="https://doc.rust-lang.org/unstable-book/index.html">https://doc.rust-lang.org/unstable-book/index.html</a><br> <p> By the same logic, you could say that C or C++ are unstable, because GCC lets you pass a special flag to opt-in to unstable features that might break in a future release. Quoting the GCC docs:<br> <p> <font class="QuotedText">&gt; C++20 features are available since GCC 8. To enable C++20 support, add the command-line parameter -std=c++20 (use -std=c++2a in GCC 9 and earlier) to your g++ command line. [...] *Important:* Because the ISO C++20 standard is still evolving, GCC&#x27;s support is experimental. No attempt will be made to maintain backward compatibility with implementations of C++20 features that do not reflect the final standard.</font><br> <p> - <a rel="nofollow" href="https://gcc.gnu.org/projects/cxx-status.html">https://gcc.gnu.org/projects/cxx-status.html</a><br> <p> This is totally under control of the project – if the kernel doesn&#x27;t specifically request unstability, they won&#x27;t get unstability.<br> <p> <font class="QuotedText">&gt; Meanwhile, I&#x27;m reluctant to try newer versions of rust (currently on 1.45.latest) because experiments with the first -rc from the forthcoming llvm showed that rust could no-longer build with system llvm.</font><br> <p> Yeah, llvm is a fast-moving project with no API stability, so it&#x27;s very difficult to use &quot;system llvm&quot; :-/<br> </div> Thu, 03 Sep 2020 12:47:23 +0000 MIR is a wiser choice https://lwn.net/Articles/830462/ https://lwn.net/Articles/830462/ edomaur <div class="FormattedComment"> <font class="QuotedText">&gt; I see no reason why Rust will need long-lived stable branches.</font><br> <p> For embedded systems certification it will be needed, specially in telecom and medical areas. For example, some times ago I used Telit GSM modem which had a Python interpreter available inside, but even if the current Python was already 2.7, the provided interpreter had to be a v1.5.8 because of the time it took to pass the certification. And in the medical world it&#x27;s even worse than that.<br> <p> To be honest, I think that the Rust community will add an LTS version for the purpose, sometime in the future, but it&#x27;s not the priority at the moment.<br> </div> Thu, 03 Sep 2020 06:04:20 +0000 MIR is a wiser choice https://lwn.net/Articles/830461/ https://lwn.net/Articles/830461/ kenmoffat <div class="FormattedComment"> My experience is that what builds now in *released* versions of mozilla or ex-mozilla packages (firefox-esr, thunderbird, seamonkey) is often broken by the second or third next rust release.<br> <p> At least some of this appears to be that things which used to be permitted are now prohibited.<br> <p> It gives me little confidence that there is stability in rust and therefore I doubt that using it for the kernel can both produce code which compiles with a three-year-old version of rust (which might be expected towards the end of a long-term kernel&#x27;s lifetime), and which offers the wonderful guarantees of safety.<br> <p> I use BLFS and we put rust in /opt with a symlink from /opt/rustc to the running version - to change that is a simple matter of remaking the symlink and running ldconfig. That allows me to use a newer version for building latest firefox, and when something else wants a newer rust (librsvg has been a common pain for that) it lets me test what can easily move to the newer rust, and what cannot. Usually, it is painful for at least one package.<br> <p> Meanwhile, I&#x27;m reluctant to try newer versions of rust (currently on 1.45.latest) because experiments with the first -rc from the forthcoming llvm showed that rust could no-longer build with system llvm. At one time in the past rust would build with system llvm, but miscompile firefox. Generally, when llvm or rust changes I expect pain.<br> </div> Thu, 03 Sep 2020 05:06:20 +0000 MIR is a wiser choice https://lwn.net/Articles/830455/ https://lwn.net/Articles/830455/ himi <div class="FormattedComment"> Yeah, and on top of that I keep seeing new projects coming along which are starting out with Rust (the one I most recently started using in my workflow is gitui, which is all of six months old but which is already a very useful tool). It&#x27;s pretty cleat that Rust has a /lot/ of momentum at the moment, and is on a pretty fast growth path. That doesn&#x27;t mean it&#x27;s future proof, or ready for all possible use cases, or even a better choice than any given alternative for a particular use case, but it does mean it&#x27;s far, /far/ past the point where it has one primary sponsor and a bunch of toy projects.<br> </div> Thu, 03 Sep 2020 00:32:21 +0000 Supporting Linux kernel development in Rust https://lwn.net/Articles/830452/ https://lwn.net/Articles/830452/ roc <div class="FormattedComment"> Rust code being hard to compile is an *advantage* for maintainers of large projects like the kernel.<br> <p> It&#x27;s hard to compile because the Rust compiler does a lot more checking. If submitted code doesn&#x27;t use &quot;unsafe&quot; then the reviewer knows those checks have been satisfied and the code doesn&#x27;t have hidden data races, hidden memory errors, etc. Rust moves work from the code reviewer to the code contributor. In my experience with the kernel contribution process this is something the kernel maintainers are very much in favour of. (It&#x27;s actually better for the contributor too, since running the Rust compiler makes a much faster feedback cycle than getting it reviewed by maintainers.)<br> </div> Wed, 02 Sep 2020 23:15:58 +0000 MIR is a wiser choice https://lwn.net/Articles/830447/ https://lwn.net/Articles/830447/ roc <div class="FormattedComment"> There are large projects where the number of stable branches is very small and and the duration for which they are maintained is not very long. E.g. for Chrome there is only one stable branch and it is maintained for no more than six weeks. For Firefox there are two and the longer one (ESR) is maintained for one year. I believe the Google monorepo never has a stable branch.<br> <p> I see no reason why Rust will need long-lived stable branches.<br> </div> Wed, 02 Sep 2020 22:49:23 +0000 Supporting Linux kernel development in Rust https://lwn.net/Articles/830421/ https://lwn.net/Articles/830421/ mathstuf <div class="FormattedComment"> <font class="QuotedText">&gt; Due to C&#x27;s simplicity, it is very easy to get drive-by contributions and get a constant stream of new developers</font><br> <p> Sure, for things like typos, whitespace changes, and other changes on a similar level. But that&#x27;s not language specific in any way. The scheduler, mm, and vfs subsystems being in C doesn&#x27;t help me making any kind of substantial change.<br> <p> I&#x27;d actually argue that having the ability to spell out better idioms and having things like ownership tracked as part of APIs would make it *easier* to contribute because the compiler can catch the &quot;dumb&quot; mistakes and leave the reviewers just having to look at the actually complicated parts instead of having to worry about &quot;oh, I see a lock here, did you unlock it?&quot; or &quot;this data should be accessed under a lock, did you acquire it properly?&quot; kinds of questions because you can enforce such things in the API directly.<br> <p> <font class="QuotedText">&gt; If the concept of a new language in the kernel is now open, then honestly C++2x would be a much better option.</font><br> <p> Ha. I don&#x27;t think it&#x27;d be that much of an improvement. For one, the plain makefiles for building the kernel would almost certainly be insufficient (unless you&#x27;re going to ban modules).<br> </div> Wed, 02 Sep 2020 17:10:53 +0000 Supporting Linux kernel development in Rust https://lwn.net/Articles/830409/ https://lwn.net/Articles/830409/ rgmoore <blockquote>If the concept of a new language in the kernel is now open, then honestly C++2x would be a much better option.</blockquote> <p>It's not likely to happen as long as Linus is in charge. He has been very negative about C++ for a long time, and there's no indication that's going to change. As I understand his view, Linus doesn't see C++ as bringing in any real capabilities that the kernel needs, while it does massively expand the size of the language in a way that makes it very difficult to keep everyone using the same abstractions. There's a reason people who talk about how great C++ is always talk about the need to use a limited subset of the language. <p>In contrast, Rust brings some capabilities for memory management that are sorely lacking in C and C++. The ability to exclude whole categories of error is potentially really valuable, and one can see why kernel developers would like to add those capabilities to their toolbox. Wed, 02 Sep 2020 16:48:20 +0000 Supporting Linux kernel development in Rust https://lwn.net/Articles/830413/ https://lwn.net/Articles/830413/ edomaur <div class="FormattedComment"> Yes, as they said there <a href="https://blog.rust-lang.org/2020/08/18/laying-the-foundation-for-rusts-future.html">https://blog.rust-lang.org/2020/08/18/laying-the-foundati...</a> :<br> <p> <font class="QuotedText">&gt; Further, it is a common misconception that all of the Mozilla employees who participated in Rust leadership did so as a part of their employment. In fact, many Mozilla </font><br> <font class="QuotedText">&gt; employees in Rust leadership contributed to Rust in their personal time, not as a part of their job.</font><br> <p> <p> </div> Wed, 02 Sep 2020 16:34:33 +0000 Supporting Linux kernel development in Rust https://lwn.net/Articles/830362/ https://lwn.net/Articles/830362/ darwi <div class="FormattedComment"> I&#x27;m not convinced this is good for the health of the kernel community. You risk splitting the community, and people squeezing-in every &quot;cool&quot; rust feature under the sun. Due to C&#x27;s simplicity, it is very easy to get drive-by contributions and get a constant stream of new developers. Meanwhile, it&#x27;s sometimes quite hard to get the damn rust code to even compile...<br> <p> If the concept of a new language in the kernel is now open, then honestly C++2x would be a much better option. The whole kernel will be built with one compiler, the benefits can cover the core kernel components (not just things in the margin), and boot-strapping new architectures would still be simple.<br> <p> </div> Wed, 02 Sep 2020 12:23:01 +0000 MIR is a wiser choice https://lwn.net/Articles/830358/ https://lwn.net/Articles/830358/ vomlehn <div class="FormattedComment"> Every real project I&#x27;ve worked on reached a point where there were specific stability points, e.g. git branches. Only bug fixes get added to the branches. This is the way the kernel stable releases work. I would expect the same to emerge shortly for Rust as pretty much all Rust users are going to required it. It&#x27;s nothing fundamental to Rust.<br> </div> Wed, 02 Sep 2020 10:39:27 +0000 MIR is a wiser choice https://lwn.net/Articles/830344/ https://lwn.net/Articles/830344/ roc <div class="FormattedComment"> rustc is different because they don&#x27;t provide updates to any compiler branches other than the current release, so using a fixed release indefinitely to generate shipping code is not a good idea.<br> </div> Wed, 02 Sep 2020 06:42:32 +0000 MIR is a wiser choice https://lwn.net/Articles/830342/ https://lwn.net/Articles/830342/ edomaur <div class="FormattedComment"> In fact, it&#x27;s the same as with GCC : the kernel require a specific version of a compiler, it can/should be the same with rustc, anchoring the Rust kernel code to a specific version.<br> </div> Wed, 02 Sep 2020 06:07:58 +0000 MIR is a wiser choice https://lwn.net/Articles/830340/ https://lwn.net/Articles/830340/ edomaur <div class="FormattedComment"> The release cycle and the API and ABI stability aren&#x27;t related : you can chose a target &quot;LTS edition&quot; of the language, incoporated in the rustc compiler, and Rust also support raw identifiers for helping working with older release. <br> <p> And about the &quot;Firefox and some toy projects&quot; part of your comment, well, it&#x27;s funny but it&#x27;s wrong, look again :-) Amazon run it&#x27;s Lambda system on Firecracker, which they wrote in Rust, Dropbox replaced Python and Go by Rust in their MagicPocket storage system, OVH use it for their custom log application, Cloudflare is pushing new tools and services written in Rust, etc. <br> <p> <p> </div> Wed, 02 Sep 2020 06:04:01 +0000 Supporting Linux kernel development in Rust https://lwn.net/Articles/830338/ https://lwn.net/Articles/830338/ roc <div class="FormattedComment"> See my comments up above. There are far more people using Rust (in production) outside Mozilla than inside it, and that has been true for years. Claiming that no-one outside Mozilla uses Rust is just weirdly out of touch.<br> <p> <font class="QuotedText">&gt; they are looking for a new home to support and fund them now that Mozilla laid them off.</font><br> <p> This is also out of touch. For years Mozilla has been steadily reducing the number of people they pay to work on Rust. For years the vast majority of the work going into Rust has come from the community beyond Mozilla.<br> </div> Wed, 02 Sep 2020 04:19:38 +0000 MIR is a wiser choice https://lwn.net/Articles/830337/ https://lwn.net/Articles/830337/ roc <div class="FormattedComment"> Hey look, just today:<br> <p> <a href="https://aws.amazon.com/blogs/opensource/announcing-the-general-availability-of-bottlerocket-an-open-source-linux-distribution-purpose-built-to-run-containers/">https://aws.amazon.com/blogs/opensource/announcing-the-ge...</a><br> <p> <font class="QuotedText">&gt; Large parts of Bottlerocket are written in Rust, a modern programming language that helps ensure thread safety and prevent memory-related errors, such as buffer overflows that can lead to security vulnerabilities.</font><br> <p> &quot;starts to be used for anything but just Firefox and some toy projects&quot; my foot.<br> </div> Wed, 02 Sep 2020 04:15:44 +0000 A libgccjit codegen for rustc is already work-in-progress https://lwn.net/Articles/830329/ https://lwn.net/Articles/830329/ antoyo <div class="FormattedComment"> I&#x27;ve been working for a while on a libgccjit-based codegen for rustc: it can compile a hello world using the standard library and can generate code for quite a few other features, but many programs won&#x27;t be compiled correctly yet.<br> <p> Here&#x27;s the link to the repository: <a rel="nofollow" href="https://github.com/antoyo/rustc_codegen_gcc">https://github.com/antoyo/rustc_codegen_gcc</a><br> </div> Wed, 02 Sep 2020 01:48:33 +0000