LWN: Comments on "Huang: Rust: A Critical Retrospective" https://lwn.net/Articles/895773/ This is a special feed containing comments posted to the individual LWN article titled "Huang: Rust: A Critical Retrospective". en-us Thu, 09 Oct 2025 05:53:56 +0000 Thu, 09 Oct 2025 05:53:56 +0000 https://www.rssboard.org/rss-specification lwn@lwn.net Huang: Rust: A Critical Retrospective https://lwn.net/Articles/897572/ https://lwn.net/Articles/897572/ matu3ba <div class="FormattedComment"> <font class="QuotedText">&gt; Situation is slowly changes, but we couldn&#x27;t just, suddenly, add stiff penalties to the code: existing codebases would instantly become useless and we don&#x27;t have anything better to replace them right now.</font><br> <p> If you look at the code that is verified, then there are 2 approaches: 1. automatize a subclass of problems (Wuffs, Rust) or 2. formally verify the code (codegen or only logic with different performance and safety requirements etc).<br> <p> <font class="QuotedText">&gt; I think it will continue to be the norm because extra work is extra time to market.</font><br> <p> Not really. Fundamental libraries make a small share of costs, but can play a huge risk on getting things wrong.<br> Though for Rust, it is more of a tradeoff than Wuffs.<br> <p> That said, product analysis has initial costs, maintenance costs and risks vs gains. The product you describe sound like low trusted brand things (throw-away products or component can be restarted on failure with low chance + cost on data loss).<br> </div> Fri, 10 Jun 2022 20:36:27 +0000 Huang: Rust: A Critical Retrospective https://lwn.net/Articles/896945/ https://lwn.net/Articles/896945/ mrugiero <div class="FormattedComment"> <font class="QuotedText">&gt; I suspect that the only reason people are not doing it more is the fact that buggy, low-quality, barely working code was the historical norm and even code used for critical systems is often delivered with “no liabilities” licenses.</font><br> <font class="QuotedText">&gt;</font><br> <font class="QuotedText">&gt; Situation is slowly changes, but we couldn&#x27;t just, suddenly, add stiff penalties to the code: existing codebases would instantly become useless and we don&#x27;t have anything better to replace them right now.</font><br> <p> I think it will continue to be the norm because extra work is extra time to market. While I do not support cutting corners that way (not everywhere anyway), there&#x27;s simply very strong commercial incentives to ship sorta-kinda-works code fast rather than correct code a few months later. It&#x27;s more or less while software keeps getting more and more inefficient.<br> </div> Thu, 02 Jun 2022 22:54:46 +0000 Huang: Rust: A Critical Retrospective https://lwn.net/Articles/896503/ https://lwn.net/Articles/896503/ khim <font class="QuotedText">&gt; Implementation inheritance is not a hack.</font> <p>It is. If your superclass implements dozen of interfaces (not atypical for complex objects) and you don't explicitly document what methods call what other method, when and how, then you don't have <b>any</b> idea how changes to one interface in the subclass would affect other interfaces (if at all).</p> <font class="QuotedText">&gt; It's entirely logically correct, provided that your code religiously complies with the Liskov substitution principle.</font> <p>Which is only possible if you read and understand the <b>implementation</b> of your superclass. Which throws away all these nice “encapsulation” and “open-close principles”. Which is then fixed, in turn, with copious amount of other hacks (“single-responsibility principle”, “dependency inversion principle” are band-aids for this problem, there are many others invented, too).</p> <p>C# and Java tried to fix that mess with default implementations of methods in C# 8 and Java 8, but, of course, then can not do what Rust did and just declare implementation inheritance forbidden.</p> <font class="QuotedText">&gt; If you *really* want provably correct code, you have to do formal verification, and there's a reason that nobody does that in practice.</font> <p>They do, they do. <a href="https://github.com/google/wuffs">Google Wuffs</a> is a pretty practical project. And Rust safety model <a href="https://plv.mpi-sws.org/rustbelt/">was formally proven</a> (even if safety of an actual Rust compiler wasn't).</p> <p>I suspect that the only reason people are not doing it more is the fact that buggy, low-quality, barely working code was the historical norm and even code used for critical systems is often delivered with “no liabilities” licenses.</p> <p>Situation is slowly changes, but we couldn't just, suddenly, add stiff penalties to the code: existing codebases would instantly become useless and we don't have anything better to replace them right now.</p> Fri, 27 May 2022 21:04:32 +0000 Huang: Rust: A Critical Retrospective https://lwn.net/Articles/896501/ https://lwn.net/Articles/896501/ tsavola <div class="FormattedComment"> <font class="QuotedText">&gt; It&#x27;s not that interesting, really. And while I wish them luck this would mean that this OS would forever stay a love letter to &#x27;90s user interfaces with a custom Unix-like core and wouldn&#x27;t turn into the next Linux.</font><br> <p> Failing to become the next Linux doesn&#x27;t seem to be in violation with the purpose of the project.<br> <p> <font class="QuotedText">&gt; Simply from their small blog post where they boldly proclaim that they would have OOP and classes it&#x27;s easy to see that they have almost given up to the templation of supporting implementation inheritance which means they don&#x27;t understand what correctness even mean.</font><br> <p> They have said that the reason for the OOPiness is that it works well for GUI application development, which is a central part of their work. It would be dumb if their custom language wouldn&#x27;t cater for that.<br> <p> <font class="QuotedText">&gt; I suspect it would be yet-another-failed-attempt-to-sway-C++-programmers. Unsuccessful because it would be too little return for too much pain.</font><br> <p> Their intended audience is SerenityOS developers.<br> </div> Fri, 27 May 2022 19:41:18 +0000 Huang: Rust: A Critical Retrospective https://lwn.net/Articles/896293/ https://lwn.net/Articles/896293/ NYKevin <div class="FormattedComment"> Implementation inheritance is not a hack. It&#x27;s entirely logically correct, provided that your code religiously complies with the Liskov substitution principle.<br> <p> The problem is, the LSP is a semantic property. Deciding whether a specific implementation is LSP-compliant depends on the implementation&#x27;s behavior, the behavior of the superclass, and the API to which both are written. In the general case, it&#x27;s not only undecidable, but it depends on factors other than the code itself (which parts of the API are contractual?). And then Hyrum&#x27;s law messes things up further from the other side of the API boundary. So if you want a language that is always provably correct, you can&#x27;t do anything that depends on the LSP.<br> <p> But then, all APIs have issues like this to some extent. There will always be fuzzy boundaries around the edges of the contract. If you *really* want provably correct code, you have to do formal verification, and there&#x27;s a reason that nobody does that in practice.<br> </div> Thu, 26 May 2022 07:42:12 +0000 Huang: Rust: A Critical Retrospective https://lwn.net/Articles/896161/ https://lwn.net/Articles/896161/ khim <font class="QuotedText">&gt; Yes, it's a bit of a pain that Rust is pretty strict about it, but I believe it makes you a better programmer and you get better programs.</font> <p>Rust gives you <b>optional</b> reference counting and you can even build your whole program on top of <code>Arc</code> links. If you are not clever enough to use other tools and if you don't plan to squeeze every last drop of performance out of your code.</p> <p>But it's <b>visible</b> in the code. And it doesn't feel “lightweight” because ARC is <b>not</b> lightweight. People did measurements and Swift is much slower than Rust or C++ for many code patterns because of ARC.</p> <p>Sure, if you want to attract developers who are accustomed to C# or Java then ARC may be a good choice, but if you are doing low-level stuff then ARC use has to be explicit.</p> <font class="QuotedText">&gt; Also, integrating reference counting into code written in other languages is tricky, I'm curious how they plan to handle that.</font> <p>That part is fine. ARC is local, it's not like tracing GC which insists on violation of any and all good engineering principles to solve problem which doesn't exist.</p> Tue, 24 May 2022 21:40:10 +0000 Huang: Rust: A Critical Retrospective https://lwn.net/Articles/896160/ https://lwn.net/Articles/896160/ kleptog <div class="FormattedComment"> I got triggered a bit on this line:<br> <p> <font class="QuotedText">&gt; Q: Why ARC (automatic reference counting) instead of a borrow checker?</font><br> <p> <font class="QuotedText">&gt; ARC allows the language to feel lightweight without constantly asking the user to make decisions about memory management.</font><br> <p> I&#x27;m of the opinion that if you don&#x27;t know where your data lives and how long it lives, it&#x27;s going to bite you in the ass. Yes, it&#x27;s a bit of a pain that Rust is pretty strict about it, but I believe it makes you a better programmer and you get better programs.<br> <p> Lazy memory management has its uses (see Python and other scripting languages for example) but they&#x27;re writing an OS here.<br> <p> Also, integrating reference counting into code written in other languages is tricky, I&#x27;m curious how they plan to handle that. Turning everything into a shared_ptr would work I suppose.<br> </div> Tue, 24 May 2022 21:26:59 +0000 Huang: Rust: A Critical Retrospective https://lwn.net/Articles/896145/ https://lwn.net/Articles/896145/ khim <p>It's not that interesting, really. And while I wish them luck this would mean that this OS would forever stay <i>a love letter to '90s user interfaces with a custom Unix-like core</i> and wouldn't turn into the next Linux.</p> <p>I understand the temptation to create a specialized language for an OS development, this may even be right thing to do for the academic project, but as fate of <a href="https://en.wikipedia.org/wiki/Oberon_(operating_system)">Oberon</a>, <a href="https://en.wikipedia.org/wiki/Singularity_(operating_system)">Singularity</a> and many other OSes shows this means you OS would be a purely academic/hobbyist world experience. Simply because you wouldn't have a robust compiler for everything-and-anything (which GCC/LLVM provide and which Rust, with it's popularity, may, theoretically, support).</p> <p>Also: while Jakt certainly sounds interesting it looks like it would try to be another Swift-like language (kinda-sorta-safe-but-not-really) and not a replacement for Rust.</p> <p>Simply from their small blog post where they boldly proclaim that they would have OOP and classes it's easy to see that they have almost given up to the templation of supporting implementation inheritance which means they don't understand what correctness even mean.</p> <p>Rust fight against it tooth-and-nail because, simply put, implementation inheritance is SUID-level mistake: easy hack to solve some simple problems in simple cases which leads to horrible mess later.</p> <p>Linus was always adamantly against such things and against opaque void-pointers everywhere… and for the same reason Rust abhors implementation inheritance.</p> <p>It would be interesting to see what <b>other</b> errors would Jakt catch besides memory errors (Rust uses it's ownership-and-borrow approach to do many things safely, e.g. <a href="https://doc.rust-lang.org/nightly/std/thread/fn.scope.html#example">scoped threads</a>).</p> <p>I suspect it would be yet-another-failed-attempt-to-sway-C++-programmers. Unsuccessful because it would be too little return for too much pain.</p> Tue, 24 May 2022 19:05:03 +0000 Huang: Rust: A Critical Retrospective https://lwn.net/Articles/896142/ https://lwn.net/Articles/896142/ jmalcolm <div class="FormattedComment"> There is enough happening on the Rust OS front to show that Rust is certainly a viable choice for OS Dev. A very interesting development though is the SerenityOS folks not only rejecting Rust in favour of creating their own language ( Jakt ) but in fact choosing Rust to code the first implementation of it.<br> <p> <a rel="nofollow" href="https://www.reddit.com/r/contextfree/comments/utqnsm/memory_safety_for_serenityos_jakt_language/">https://www.reddit.com/r/contextfree/comments/utqnsm/memo...</a><br> <p> <p> </div> Tue, 24 May 2022 16:46:57 +0000 Huang: Rust: A Critical Retrospective https://lwn.net/Articles/895980/ https://lwn.net/Articles/895980/ scientes <div class="FormattedComment"> Joy to read. Especially the analogy about pulling carefully bundled and labeled cables. Now try mixing aluminum and copper! (Not sure where I am going with that analogy besides trying to be cute)<br> <p> Thanks bunnieh.<br> </div> Mon, 23 May 2022 13:37:18 +0000 Huang: Rust: A Critical Retrospective https://lwn.net/Articles/895992/ https://lwn.net/Articles/895992/ dskoll <p>I haven't worked with vanilla Yocto/OpenEmbedded, but I spent a painful 18 months dealing with Petalinux from Xilinx (based on Yocto) and I'm scarred for life. I'll be happy never to touch it again, which is very likely since I stopped doing embedded development in 2020. <p>Bitbake is indeed powerful... but the various recipes and ways of overriding them are badly-documented and filled with magic. Most vendors' layers are full of opaque recipes and zillions of variables whose meanings are not very clear. Mon, 23 May 2022 13:18:20 +0000 Huang: Rust: A Critical Retrospective https://lwn.net/Articles/895991/ https://lwn.net/Articles/895991/ NAR <i>"... about 5700 lines of code from various third parties that manipulates files, directories, and environment variables, and runs other programs on my machine every time I do a build."</i> <p> I understand that <strike>paranoid</strike>security-conscious developers don't like this. But this is not specific for these "new" languages. I mean in how does someone install software written in C? Downloads some .tar.gz from somewhere, untars it, then executes <code>./configure</code>. The generated (i.e. write-only) configure script creates files, calls the compiler, executes random stuff, etc. Then <code>make</code> will also manipulate files, environment variables, etc. This is not a new problem - maybe the environment is new, but those generated Makefiles are as much opaque as the auto-executed code in those crates. Mon, 23 May 2022 12:18:12 +0000 Huang: Rust: A Critical Retrospective https://lwn.net/Articles/895974/ https://lwn.net/Articles/895974/ ssmith32 <div class="FormattedComment"> &quot;Software people are quick to remind me that first and foremost, I make circuits and aluminum cases, not code, therefore I have no place ranting about software. &quot;<br> <p> Yikes, hopefully he never catches all the software developers (myself included) who regularly complain about circuits and aluminum cases ;)<br> </div> Mon, 23 May 2022 02:28:15 +0000 Huang: Rust: A Critical Retrospective https://lwn.net/Articles/895960/ https://lwn.net/Articles/895960/ smoogen <div class="FormattedComment"> Actually it can be quite conceivable. I know lots of OS developers who even work in embedded who have not done anything deeper with Yocto than dropping in a .bb file someone else wrote. And then there the ones still doing things &#x27;hardcore&#x27; embedded or look at it and say &#x27;well yeah, but I already do that with my own crafted Gentoo&#x27;. The yocto method is very cool and has a lot of ways of doing things well for this usecase.. however, the method is different enough that a lot of &#x27;complaints&#x27; usually are just having to bend your usual way of doing things into the build system.<br> </div> Sun, 22 May 2022 18:47:13 +0000 Huang: Rust: A Critical Retrospective https://lwn.net/Articles/895950/ https://lwn.net/Articles/895950/ chuckwolber <div class="FormattedComment"> &quot;... about 5700 lines of code from various third parties that manipulates files, directories, and environment variables, and runs other programs on my machine every time I do a build.&quot;<br> <p> &quot;... one fix to this would be to re-configure our build system to run in some sort of a chroot environment or a virtual machine that fixes the paths in a way that almost anyone else could reproduce&quot;<br> <p> Those problems (and more) are why bitbake is such a powerful embedded build tool. It is inconceivable to me that Bunnie has not yet encountered and spent time evaluating Yocto/OpenEmbedded, so I am very curious what his objections are.<br> <p> </div> Sat, 21 May 2022 21:06:38 +0000 Huang: Rust: A Critical Retrospective https://lwn.net/Articles/895863/ https://lwn.net/Articles/895863/ khim <p>There are, actually, a lot of work done in Rust to make it suitable for OS development.</p> <p>Sure, it's not raison d'etre of Rust existence, and not the primary target of language development, but it's a pretty well-supported target.</p> Fri, 20 May 2022 13:55:11 +0000 Huang: Rust: A Critical Retrospective https://lwn.net/Articles/895822/ https://lwn.net/Articles/895822/ pabs <div class="FormattedComment"> There are other operating systems written in Rust:<br> <p> <a href="https://www.redox-os.org/">https://www.redox-os.org/</a><br> <a href="https://en.wikipedia.org/wiki/Rust_">https://en.wikipedia.org/wiki/Rust_</a>(programming_language)#Operating_systems<br> <a href="https://github.com/flosse/rust-os-comparison">https://github.com/flosse/rust-os-comparison</a><br> </div> Fri, 20 May 2022 09:16:58 +0000 Huang: Rust: A Critical Retrospective https://lwn.net/Articles/895821/ https://lwn.net/Articles/895821/ kleptog <div class="FormattedComment"> Very nice blog post with some valid criticisms but it&#x27;s also impressive that they managed to build an OS on Rust. It&#x27;s clearly not a well supported use-case but it does show what&#x27;s possible.<br> </div> Fri, 20 May 2022 08:48:51 +0000 Huang: Rust: A Critical Retrospective https://lwn.net/Articles/895796/ https://lwn.net/Articles/895796/ IanKelling <div class="FormattedComment"> I enjoyed this blog post. I have a precursor. All I&#x27;ve done is reflashed it so far. While I haven&#x27;t yet analyzed the source licenses in detail, it seems it is probably running entirely free software. The other modern computer that comes to mind which I actually know is entirely entirely free software is a raptor computer without a hard drive. It seems like a wonderful device to learn about hardware and rust.<br> </div> Thu, 19 May 2022 17:58:26 +0000