Rust is the best language for AI agents, says a programming language designer

What agents mean for Rust (and vice versa)

Rust is the best language for AI agents, says a programming language designer

As someone who has made a career of programming language design, I have moments of existential dread about LLMs. But I believe there will still be a role for humans in programming, and that programming language design is still relevant. In fact, Rust is a really good fit for agentic development – and we can make it even better. This post argues why and discusses what we might change about Rust.

Type systems can show the absence of bugs, but not the presence of correctness.
  1. gregwebs

    Rust does have one glaring weakness: compile times. I suspect in the LLM era we will see the rise of a language or perhaps some sort of Rust redesign that achieves what Rust has with great performance and great type safety but also has better support for fast compilation.

    I have found that agents are good at writing Verus proofs in a Rust code base, and that these proofs have only a minimal negative effect on the normal compilation path. I have a skill for using Verus: https://github.com/gregwebs/skills-sdlc/blob/main/skills/rus...

  2. kubb

    I wonder if „hard“ languages like Haskell will make a comeback with LLMs, because the short term cost of learning the language isn’t that significant anymore contrasted with the long term benefits of the type system and better structure.

  3. xscott

    I think we could step back and make a list of programming languages features that are helpful or harmful to LLMs writing code. I don't have a complete list, but things I've thought about:

    Useful error messages at compile time

    Fast compilation to iterate and fix those errors

    Efficient memory, CPU, and maybe GPU at runtime

    Familiar from the training data [0]

    One obvious/preferred way to do things

    Explicit types

    Rust hits some of those, but not all. I can't think of a language that hits all of them, but a lot of people sure love to rationalize why their own favorite language is the best choice. LLMs don't need syntax sugar and other niceties, and any errors postponed to runtime are a burden on you, not the model.

    We could add a few more rarely seen features to increase confidence in the results and make future modifications or switching models go better:

    Required pre-conditions and post-conditions

    Enforced limits on function or method length

    Mandatory test cases

    Enforced naming conventions

    Lean style proofs of correctness? (probably not)

    I'm on the fence about things like linear/affine types for memory management vs garbage collection. Obviously you want memory safety, but there's more than one to get that, and I don't know that you want to force contortions to build simple data structures.

    [0] LLMs are very capable of programming in languages they've never seen before. I've had them write programs using my own toy compilers fo […]

  4. Depurator

    I've been writing rust for maybe 6 years now, and Im very happy i started before the LLMs entered the scene so i had to fight the borrow checker and all that jazz.

    Now, I will say im extremely productive with rust and LLMs, and its also comfortable to know that I wont have to rewrite anything to a new language, rust is already the best.

    A famous swedish comedian talks about heroin as the "best drug". Where people usually end up and don't want to stop taking.

  5. antoineMoPa

    I've been "coding" a couple of apps with agents + rust recently and I realize how terribly huge the target/ folder can grow. Then, you run cargo clean, get a clean disk but compilation takes forever again. I routinely run out of disk space.

    Love the experience in general except that part.

More from this day

2026-10-14