2026 is an exciting year for the Rust compiler (and me)

13 hours ago (yoyo-code.com)

I don't think rust is the future anymore, despite having contributed to its compiler few times and been quite involved for years. It has spread too much and that impact compiles time too much.

I think a newer language, having the boreness of go, the compile speed and maybe comp time of zig and safety of rust will emerge, maybe with lisp syntax.

  • > I don't think rust is the future

    Yeah because it's the present. Rust is everywhere now.

  • Well, that implies there's some sort of threshold that it's still reaching for and hasn't yet achieved before it can be considered successful. But it's already everywhere now. Hell, not only is it in the Linux kernel, it's even in Windows (!).

    • 2026 has really been the year of Rust. The fact that it can run in the browser as well as natively has made it an electron killer.

  • What a weird take. At first I though you were going to predict a language with an even more featureful and strict type system.

    We don't need the "boreness" and human usability of Go anymore. Fast compile times are still nice though.

    Lisp syntax doesn't have much value in the age of AI I think. Lisp seems optimized to make it easy to parse, and also easy to hack on the interpreter. I don't think Lisp was ever meant to optimize human readability. The uniformity and minimalism of Lisp makes it easier to learn the syntax though. -- I don't know, maybe I underestimate the value and flexibility of Lisp syntax.

    I think the most valuable features of programming languages now are human readability and type systems that give guarantees humans can rely on. Some of the most exciting code AI has written has been in Lean.

> It's easy to understate how big of a deal this is for the compiler. This work resolves a major piece of technical debt that a lot of compiler developers dreamed about for years.

No kidding. I’ve been waiting for the solver at least half that decade now. Hopefully it and Polonius unblock specialization which has been in purgatory for years.

  • There's some movement on specialization as well: https://goals.rust-lang.org/2026/specialization.html

    It's not directly blocked on the solver, but getting the type system into a better shape definitely helps reasoning about the soundness issues involved.

    • More precisely: it wasn't known to be blocked on the new solver (unlike some other features), because nobody dared to touch it until recently... (more seriously, there wasn't enough investment).

Smaller target directory size would be such a lifesaver. Hoping the best for you, and Rust!

  • This!

    There's a recurring meme here and in other social media about rust being slow to compile, but anyone who's worked with Rust know that target dirs are a much more annoying papercut in practice than the relative speed of the compiler (which isn't appreciably worse than any other toolchain out there for the most common workflows).

    • A papercut is an unbelievable way to describe this. I tried forking Codex CLI and, for a terminal UI that manages chats and HTTP requests, it takes over 15 minutes to rebuild trivial changes on a top-shelf CPU with all incremental/caching optimizations, and tens of GBs in build caches. Neither of those is acceptable. Full stop. I am aware part of the problem is that Codex CLI is a vibe-coded monstrosity (surprise, software is not solved), but I've not had this problem with vibe-coded monstrosities in eg. Go. Hold your language to better standards. That doesn't mean abandon Rust; that means strive to make the Rust toolchain better than the Go toolchain rather than shrugging your shoulders and saying "lol this is fine no way anybody could do anything about this".

      17 replies →

    • Both (and memory) are a problem. Build sizes is definitely more easily solved just by throwing more disk at it though (unless you are using a hard constrained mac...).

      5 replies →

  • It would help, yes. Here's one of my projects, that uses different subdirectories in target/ based on compiler options pre-commit runs:

        $ du -hcs target/
        190G    target/

    • I can deal with large builds, what I cant deal with is time. My rust web application takes 20 minutes to build in release mode on a high end developer machine. I can’t build it in ci/cd.

      3 replies →

  • Could you e plain the issue for a non-rustacean?

    • The Rust toolchain by default produces a lot of debug information for each crate being compiled and the language relies heavily on monomorphization (instantiating a different function/type for each combination of generics) which translates to generally having duplicated functionality where the only difference in the object code is the different types. These two things combined, along with large dependency trees and that "features" for conditional compilation cause the same crate to be considered different across different workspaces (meaning the rlibs that were created for one can't be reused for another), means that the target directory for Rust projects can quickly grow. That, + clippy not having stabilized an already implemented process to automatically delete files from the target directory when they are unlikely to be needed again (which can't be 100% accurate, it uses heuristics because a developer could always potentially need an exact rlib from 6 months ago, it is just unlikely) means that you can expect that under the default configuration your target directory ends up being huge after a short period of time.

      A lot of those things are in different stages of being fixed. I would personally want the default for generated debug information to be changed. cargo gc will help with running out of disk space. Better cross-project reuse of existing rlibs could be accomplished with some better tracking of optional features that can be unified (think having `serde` with feature `derive` enabled in one project, and having it without it in another: features are supposed to be purely additive, so you could reuse the earlier rlib on the later, but in practice people (ab?)use features in non-additive ways so it isn't straighforward to do something like that by default). Tools like hakari lets you create workspace-unified Cargo.toml to emulate this behavior.

      1 reply →

I'm curious about polymorphism. Should it be default on for debug builds just to save storage and compile time? How will rust decide whether to enable polymorphism? Will it be possible to provide source-level polymorphism hints to the compiler?

  • The "hint" you could provide today for polymorphization is to write code like

        fn needs_string_like(x: Into<String>) {
            fn actual_logic(_: String) {}
            actual_logic(x.into())
        }
    

    which is the explicit way of representing the same thing rustc would be doing automatically. The above will create an almost empty `needs_string_like` for each type that it is called with, but a single `actual_logic`. IIRC some optimization passess would completely remove specific instances of `needs_string_like` (like if you call `needs_string_like(String::new())`).

  • > polymorphism

    I assume you ask about polymorphization, which is a term used to refer to a specific optimization mentioned in the blog post.

    The base version which Rust wants the most makes sense to enable by default for all builds, because it's purely just removing duplicate work - this is for cases like Vec<u64> and Vec<i64>, where we currently emit code for each one separately, even though it's pretty much the same for both.

    More general version will make sense for debug builds or in some special cases, like when optimizing for size. I believe people also want to experiment with it for some interop use cases (and for that, it'd be useful to have source level annotation). I think it's too early to tell how all of this is going to look like, though.

I don't understandy why, but all submissions of this post so far had incorrect title. When I posted the correct one, it still got reassigned the wrong title and I had to edit it (and it didn't allow me to do that yesterday, only today).

  • Hacker News has some automatic fixes for title text. Some - perhaps all - of them can walk into false positives where a change that's usually desirable instead ruins the title either because it's a joke and the change spoils the joke or just because English is complicated.

What are the problems in async the new trait solver will fix? Looking forward to building more on async Rust so I'm curious

  • Return Type Notation (RTN) I believe is the big one blocked by the new solver. This is the primitive that makes it possible to add bounds to futures returned by async functions. This should look something like: `where <T as Trait>::method(..): Send`.

    This is one of two remaining features needed to make Async Functions in Traits (AFITs) practical. Dyn dispatch support being the other missing feature, though that isn't blocked by the new solver.

Pretty wild to see how different people’s experiences can be within the same industry but under different applications and circumstances, here is someone joyful about the future of a language whereas not long ago we had a Ruby gem maintainer in deep dissatisfaction and frustration with the future of it.

Not implying to compare Rust and Ruby, just mainly observing how these two things came out near each other in the present day.

  • Leadership matters. I don't suppose the Rust leaders have been telling their community to write more open-source code for free with the express purpose of replacing those people with LLMs trained on their work.

    • On this topic, how ironic that the Ruby dude who is getting infamous for doing this is preaching moving to Rust

Somewhat indirectly related, but is there any progress on implementing persistent caching in rust-analyzer? It would really benefit from faster startup times.

  • (r-a team member here) The progress is in Salsa (the incremental framework we use), not in r-a itself yet. And there is progress but it's not particularly fast, it's also not a priority for the r-a team (though if you want to contribute, you're welcome of course).

    • You mean progress to make the framework faster itself?

      I was asking about something else, i.e. basically saving whatever possible from those expensive computations on disk, so next time it starts, it can spend significantly less time (assuming things didn't change too much). clangd has such feature and it's super helpful.

      Or you mean Salsa already supports such persistent caching in some form?

      2 replies →

[flagged]

  • The implication being that you're writing in a language so unsafe that you need to pay for AI data centers to periodically double-check it for you. That isn't the argument in favor of C that you think it is.

  • I hope this is satire.

    • It is not. Tell me one good reason to deal with the horrible language called rust now that we have mechanisms capable of doing the exact same stuff in a vastly less obnoxious manner....(I am talking about running LLMs over your C code once in a while).

      I don't like rust because

      1. Verbose Syntax made worse by having to include type system info... 2. Dumb Borrow checker 3. Automagic stuff...

      3 replies →

  • I've never seen a proof that LLMs can fix memory safety in C or C++ like Rust does. I'll believe it when I'll see it.

    And I prefer to work with Rust than both anyway. Such advancement (if it will happen) will only make other languages like Zig feasible for me.

  • or to save tokens you can have an LLM write a borrow checker to do this for you. Oh wait you're just rebuilding rust...

    • The point of writing in C is that I don't have to deal with borrow checker shit when it is too dumb to figure out what I want to do is actually safe.

      3 replies →

The best way to get a rust job is get a regular job and just write rust

  • I did this once but with Elixir, and it worked - because I shipped ahead of schedule (way ahead of the other teams portions). Performance and quality met the standards. Sometimes it's better to ask for forgiveness than permission if that means not having to fool with Java.

    • Unless you work at a FAANG the team will ask you to make a tool and will probably be fine with a mainstream language.