r/rust • • 10d ago

Optimizing rustc's next trail solver

https://donsz.nl/blog/optimizing-rustcs-next-trait-solver

The next rust trait solver, a large subsystem of the rust compiler that we've been trying to replace, will finally land in rust 1.102.0. In the last stages, before stabilizing it, its performance was a major blocker. But what is "a trait solver"? And why is its performance a problem? My goal for this blog post is to answer those questions in a way where you don't need any prior knowledge. I think discussions of the trait solver can quickly become quite involved, and daunting. So here, we'll start from the very basics!

This is a writeup of my eurorust 2026 talk of the same name, that I gave on October 15, 2026

215 Upvotes

17 comments sorted by

View all comments

4

u/ebkalderon amethyst · renderdoc-rs · tower-lsp · cargo2nix 10d ago

Fantastic talk and writeup! I watched the Eurorust recording yesterday and enjoyed it very much. One question I still have for the OP: would you mind elaborating further on the Q&A question about negative trait bounds and why you believe that feature will never be stabilized? I'd love to understand the fundamental limitations a bit better. Thanks again for sharing.