# Rust's new trait solver finally ships in 1.102.0 after a decade of work

Original title: Optimizing Rustc's next trait solver

> Hacker News story 50641990 · language: en · submitted 2026-11-25
> Web version: https://zeli.app/story/50641990
> About this feed: https://zeli.app/llms.txt · Agent guide: https://zeli.app/skill.md

▲ 200 · by [g0xA52A2A](<https://news.ycombinator.com/user?id=g0xA52A2A>) · 💬 31
[original](<https://donsz.nl/blog/optimizing-rustcs-next-trait-solver>) · [HN discussion](<https://news.ycombinator.com/item?id=50641990>)

## Summary

After eleven years of development — starting with the Chalk project in 2015 and becoming an official compiler effort in 2022 — Rust's next-generation trait solver lands in Rust 1.102.0. Performance was the last major blocker before stabilization. The author, who spent a year full-time optimizing it, explains from scratch what a trait solver is, why it resembles a Prolog interpreter, and why even answering "is this type Sized?" happens roughly 800,000 times when compiling the standard library.

## Key quote

> We now call this project "project zero", referring to the number of soundness bugs we'd ideally like to have in our type system.

## HN discussion (31 comments)

### [cbarrick](<https://news.ycombinator.com/item?id=50687908>)

> Nit: "et cetera" is two words.
>
> It is a latin phrase that literally translates to "and the rest." "Et" means "and," and "cetera" means "the rest."
>
> This is a great article! Apologies for being pedantic. I'm just noting this fun fact here in case the author is checking this thread.

### [cogman10](<https://news.ycombinator.com/item?id=50689296>)

> I was curious to figure out exactly why the new trait solver was needed.
>
> Apparently it's easier to work with and more correct.  Future type system changes are blocked on it.  These 2 in particular were called out as being blocked by the new trait solver [1]
>
> [1] https://goals.rust-lang.org/2026/rtn.html

### [AlotOfReading](<https://news.ycombinator.com/item?id=50685496>)

> It's interesting how much of the next gen compiler improves borrow heavily from logic programming. I don't know if any other compilers that have made the connection to logic programming as explicit as rustc.

### [ozgrakkurt](<https://news.ycombinator.com/item?id=50687619>)

> Rust compilation is impossible to solve for some reason.
>
> I have a 4k line project that depends on serde-json, xxhash, crossbeam and rand.
>
> It takes several seconds to compile in release mode.
>
> This is insane compared to my 20k line project in C++ which compiles everything and runs all tests in 0.7 seconds.
>
> The C++ project doesn't depend on libc or any external libraries but that is not a practical option in rust.
>
> I tried bunch of different options and actually removed some dependencies but it seems like it is not possible to get the rust program to compile fast.
>
> Does anyone know why it is this slow comparatively?

### [eosis](<https://news.ycombinator.com/item?id=50686069>)

> Awesome work, seems an odyssey.
>
> I think there is a little error in the code snippets near the caching section start where it claims variables are swapped but they are not? Though maybe I have just misunderstood something.

---

## Cite

- Page: https://zeli.app/story/50641990
- Date: 2026-11-25
- Source: donsz.nl (https://donsz.nl/blog/optimizing-rustcs-next-trait-solver)
- Hacker News: https://news.ycombinator.com/item?id=50641990

## Other languages

- zh: https://zeli.app/zh/story/50641990 · markdown: https://zeli.app/zh/story/50641990.md
- ja: https://zeli.app/ja/story/50641990 · markdown: https://zeli.app/ja/story/50641990.md
- ko: https://zeli.app/ko/story/50641990 · markdown: https://zeli.app/ko/story/50641990.md
- de: https://zeli.app/de/story/50641990 · markdown: https://zeli.app/de/story/50641990.md
- es: https://zeli.app/es/story/50641990 · markdown: https://zeli.app/es/story/50641990.md
- ru: https://zeli.app/ru/story/50641990 · markdown: https://zeli.app/ru/story/50641990.md
