LmCast :: Stay tuned in

What agents mean for Rust (and vice versa)

Recorded: Oct. 14, 2026, 10:09 a.m.

Original Summarized

What agents mean for Rust (and vice versa) · baby stepsbaby stepsThis blog is where I post up various half-baked ideas that I have.All PostsCategoriesGitHubTwitterRSS/Atom feedsSelected posts:The borrow checker withinEmpathy in open source: be gentle with each otherWhat agents mean for Rust (and vice versa)14 October 2026Me, calmly assessing the implications of LLMs for programming language design(ers).As someone who has made a career of programming language design, I definitely have moments of existential dread about the rise of LLMs. I started coding in 5th grade on an x861 that ran at 5MHz, had something like a 5MB hard-disk and 512K of RAM2. Computers were really, really different back then. But honestly, programming wasn’t. For all the advances in IDEs and programming languages and so forth, the basic act of entering code into a file has remained surprisingly constant3 – right up until a few years ago, when everything kinda turned on its head. That’s been exciting and empowering at times4 but also scary and disorienting. Will my skills in programming matter? What about my skills in programming language design (such as they are)? This blog post is my attempt to answer those questions.So as not to keep you in suspense, let me just give you the conclusion. In short, yes, I believe there will still be a role for humans in programming. And yes, I think that programming language design is still relevant. And, naturally, I also happen to think Rust is a really good fit for agentic development – but that’s not to say we can’t make it a better fit. And that’s what this post is ultimately about: what makes Rust and agentic development work well, and where we could double down on those strengths.This is a kind of “blog post companion version” of a talk I gave this week at REBASE, part of SPLASH. You might also enjoy the slides from the talk I gave at IWACO, IWACO and Rust: hidden links revealed, which was a bit more of a retrospective (no soundtrack for those, though). In any case, this turned out to be a great conference! Jack Huey presented on the Rust Vision Doc and, quite to my surprise, Steve Klabnik and Dorian Scheidt presented “LLMs as Collaborators in Language Specification and Design”, talking about their process in building out Rue. It was fun to see Steve again. On top of that, there was a ton of great research presented at IWACO in particular. I was particularly taken by the work on Reachability Types and Information Borrowing. I also really liked learning about Hylo Lang, particularly their approach to projections. Clever and cool.Rust is popular in the agentic eraFrom the most important Slack channel at Amazon, #aws-memes.Rust is popular right now. Very popular:Stratospheric among the breakout languages is TypeScript, cropped from the chart and sitting currently at +1200% growth from the prior year. [..]The second most rapid recent growth is in Rust. Meta engineers have written twice as much first-party Rust code so far this year than in the previous 9 years combined.— David Tolnay (emphasis mine)Some of that is because agents make it very easy to try out new things. And some of that is because Rust has a reputation for being performant and, if it’s just as easy to pick any language, why not pick one that will yield faster execution times?But I think Rust is popular for another reason: because Rust happens to be a really good fit for agentic coding6. Of course, I would, wouldn’t I? The point of this post is (1) to argue for why that is and then (2) to discuss what we might change about Rust to make it work even better.Foundational Software construction with agentsIt seems to me that an effective “software factory” will have three pillars:Design: figure out and specify clearly what the code is supposed to do.Construction: author code that does what it is supposed to do.Optimization: optimize the code so that it runs efficiently.None of these pillars are solved, but some have made more progress than others.Rust and optimization: fast by default, knobs when you need ’emRust is designed to give “good performance by default”, making the idiomatic thing typically also be the fastest thing. But another key part of Rust is that you have the knobs to eke out better performance when you need it. You control when something is stack- or heap-allocated and where pointer indirection occurs. If you want to, you can force the layout of your structs to be done in a particular way, or decide where to introduce boxing into your async stack frames. In the limit, you can put in inline assembly.In the past, learning how to “tune the performance knobs” could be a bit of a black art: but agents are making that much easier.7 It turns out that agents are really good at fine-tuning the performance of existing code. For example, people who work on super high-performance cryptographic algorithms used to do so by hand-tuning assembly code. But those people tell me that they are now turning to agents for that same job. More prosaicly, a lot of people building network services are finding that, using a profiler like dial9, agents can quite effectively diagnose async performance pitfalls, like long polls or blocking.Therefore, I think the task for Rust is clear. We keep on with our goal of “low-level enough for a kernel, high level enough for a GUI”. If anything, I think the shift around agents means we can tolerate a bit more “noise” in the form of explicit calls to clone() or share() – but not too much, since we still want the “happy path” of the code to be clear and evident8, even as we surface details that are important in specific scenarios (like tracking precisely how many clones you have of a channel endpoint). Combined with a profiler, you get an effective feedback loop to get your code running fast:flowchart LR
Code -- Benchmark --> Profile
Profile -- Analyzed by --> Agent
Agent -- Propose --> PR
PR -- Improve --> Code
Reliability is king, as alwaysAs usual though, while a reputation for good performance is what brings people to Rust, what makes them want to stay is a sense that using Rust “just seems to work better”. The basic theory is that Rust’s type system and guardrails help keep agents on track:rust is a perfect language for agents, given that if it compiles it's ~correct— Greg Brockman (@gdb) January 2, 2026I think there’s truth in that: languages like Rust, Ocaml, or Haskell all share this “if it compiles, it works” feeling, and I think that agents will benefit from that.Testing is not enough, type systems helpTesting can show the presence of bugs, but not their absence.— Edsger W. Dijkstra, 1970Agents presenting their work.Writing tests has never been enough to show that your program is correct – but, with agents, it’s not even close. It happens so often that my first few tests seem great and then the next one goes completely bonkers. Usually bonkers in a way where I cannot even imagine how that bug could have come about. Then I dig in and I realize the agent completely missed the boat on the logic I was trying to express.9This is where a type systems really shines – particularly an advanced one like Rust. Type systems give you some guardrails that keep the agent on track. In Rust, those guardrails extend beyond simple stuff like “do all fields have the correct names” and to stuff like never having to close a socket.Type systems are not enough eitherType systems can show the absence of bugs, but not the presence of correctness.— Me, failing to coin a phrase of equal eloquence10, 2026So yeah, type systems are helpful! But they have inherent limits. A type system is a simple set of rules that, if you follow them, make sure that you avoid (certain kinds of) mistakes. But they don’t tell you that you do the right thing – only that you don’t do (certain kinds of) wrong things. If you want to go further, you need a proof system – something that will let you show that richer properties are actively true, not just that you’re avoiding bugs.As it happens, there are a lot of interesting proof tools for Rust, like Verus, Creusot, Aeneas, and Kani. As a starting point, you can prove that your code is panic-free, which will eliminate a lot of bugs, though it is still fundamentally a “type-checker-like” property (i.e., you avoid doing things wrong). But you can also go further and add assertions that show your code is computing the results you expect.Strong guardrails give better performanceDeplying proofs is not just good for getting code right – it’s good for getting code fast. This is somewhat counterintuitive, but it’s true. Earlier I mentioned how optimized cryptographic algorithms were now being written by agents. Part of what makes that possible is that cryptographic algorithms have a very clear mathematical definition. This means that you can basically tell the agent “do whatever you want, as long as you can prove that the code still computes the correct result”. These proofs can be done with theorem provers like Lean or Rocq. The blog post “Why Lean is faster than Rust” makes the point quite well.For Rust, a good example of this would be around unsafe code. Right now, people are sometimes reluctant to deploy unsafe code even if it might make their code faster because it’s not worth the risk of getting it wrong. And I applaud that effort. But what if you could use a prover to show that your unsafe code is, in fact, safe (i.e., incapable of causing undefined behavior)? Then you’d be free to optimize to your heart’s content.If we are going to prove things, do we need type systems?You might wonder: if we’re deploying a proof system on our code, do we still need type systems? I think the answer is definitely yes. Type systems are infinitely simpler to work with, which is why they are much more popular. Using a type system lets you rule out all kinds of annoying bugs so that you can focus your “proof energy” only on the important stuff.As a simple example of this, consider the following Java code:void setFoo(Bar bar) {
this.foo = bar;
assert this.foo == bar;
}
Without seeing more code, it is impossible to prove whether this assertion is true or not! This is because there could be any number of other threads running around mutating this. In contrast, the following Rust code must be true (at least, so long as the Eq operator is reflexive for Bar):fn set_foo(&mut self, bar: Bar) {
self.foo = bar;
assert_eq!(self.foo, bar);
}
We know this because the type system of Rust guarantees that &mut self implies a unique reference.This is in fact exactly how Verus works. By trusting the Rust borrow checker to track uniqueness etc, it simplifies the job of the SMT solver, making proof checking must faster and more reliable than it would be otherwise.Where I think Rust should go on reliabilitySo my take is that Rust should double down on if it compiles, it works. As expressive as Rust’s type system is, there are plenty of things that it cannot capture. This includes fairly common things, like this method only reads one particular field or internal references, but also fancy things like “no logging of personally identifiable information”. We should work to lift those limits, giving agents room to prove more complex properties.We also need to improve the experience of integrating a proof tool by working towards an extensible compiler. As cool as the existing Rust-based proof tools are, using them is a janky experience involing annoying macros and pinned compiler versions. We can do better.A north star: No more unsafe codeI’d like to propose a north star for Rust: no more unsafe code. By that, I don’t mean that we never use the unsafe keyword. Rather, I mean that we have the power to prove that all the unsafe code we write is correct and cannot cause undefined behavior. Don’t get me wrong: knowing exactly what code needs to be vetted is a huge step forward, as is normalizing the idea that libraries need to be responsible for protecting their users from undefined behavior via safe API boundaries11. But given agents’ ability to find vulnerabilities, I think we need to up-our-game if we want to stop the steady stream of CVEs.12Design is an open problemBut before you go about proving things or optimizing them, you need to have a clear idea of what you are building. As far as I can tell the state of the art here is basically variations on “markdown-driven-development”, developing docs and hoping that agents pay attention.I don’t know how much of a role for Rust there is in this space. I think there are some steps we might wind up taking that could be helpful here – for example, having ways to separate out interface from implementation so that it’s easier to review the interface in isolation or to see when the agent made changes there.13 Or perhaps just providing betters tools to review that.I also think there’s space for dedicated “modeling languages”, something that let you iterate quickly with agents on the high-level designs and invariants without having to get into the weeds and read the code. I have more thoughts on this but it merits many blog posts all of its own. For the moment, I’ll settle for pointing you all at this post by Kari Wilhelm, “Principles of Anchor Engineering”, which I think does a nice job of describing what it means to pull out the key elements of a design and drive the coding from there.ConclusionWe covered a lot of ground here, so let me put this all together. What makes Rust a good choice for developing with agents?It offers good default perf (why pay more?) and, in conjunction with a profiler, can be tuned as much as you want.The type system gives stronger guardrails, and if you setup your agents right, you can strengthen those guardrails through techniques like new types.And what could make it better, from a language design perspective? Overall, I think it’s very similar to what we were doing, except that the way we weight the tradeoffs is tweaked to account for agents doing the code authoring, and humans focused more on code comprehension:If it compiles, it works – our type system is our big advantage, we need to make it more expressive and more functional so that agents don’t get stuck trying to work around it!And as an adjunct, establish a North Star: Enable Unsafe code without unsafety by supporting proof, and see the most widely used Rust libraries proven sound.Low-level enough for a kernel, high-level enough for a GUI – make sure we expose the knobs needed to tune for performance, while also making the code’s intent clear (but don’t worry about golfing the code down to an absolute minimum number of characters).Extensible and versatile – one of Rust’s great strengths is that, with macros + our type system, we support DSLs and a wide variety of targets. We need to bring that spirit of extensibility into the compiler so we can target more styles of development (e.g., GPU, deep language interop, etc) and also integrate theorem provers and other tools that require more than just tokens.As a final close, let me point you at this interesting article by Marc Brooker, “What’s easy now? What’s hard now?”. He posits that the more it is possible to clearly specify success criteria for a task, the easier it is, and that we may find that tasks we traditionally think of as ‘hard’ (e.g., building out an efficient implementation of a cryptographic algorithm) may soon become automated, whereas tasks that we have thoght of as ’easy’ (e.g., making a unique, compelling website) may become more valued.Looking at it from a PL point-of-view, I think Marc’s point reinforces my sense that the biggest action is going to come from design languages, things that let you capture the architecture and intended behavior at a very high-level. The goal would be to let humans intuitively specify a design that gets translated into effective guardrails, whether that’s type system checks, lints, or theorems to be proven. Agents would then take on the task of translating the design into code written in a traditional PL like Rust, with humans looking at it only rarely. This doesn’t make the design of traditional PLs less interesting, but it definitely makes the tradeoffs very different than they were before.Secretly I have always been jealous of people that coded using punchcards and stored things on gigantic rolls of tape or whatever. I just want to be world weary so badly! I am kinda delighted that I’m finally old enough that I can say things like “I remember when we had to edit CONFIG.SYS before we could play a computer game!” and younger programmers will gasp in horror.5 But I still feel like I must sound like a silly kid to folks who were around “back in the day”. ↩︎I still remember when my dad told me he had bought me a 10MB disk and secretly he had bought a 40MB disk to surprise me. It seemed absurdly large. “I’ll never need a new disk again!” ↩︎I mean my god, we’re even using vi again! My first editor! ↩︎I built an electron app! And it was so easy to do! And reading weird papers and things is so much more accessible now that I can ask an LLM to translate all the math jargon for me. ↩︎I remember once trying to tell Alex Crichton how I used to “order shareware from a paper catalog by putting a check in the mail” and he was like “I do not understand any of the nouns in that sentence”. Highlight of my life, right after Rust 1.0. Oh, and maybe the birth of my child and getting married. I guess. ↩︎I’m not saying Rust is the only language that’s a good fit. I’m not even saying that the way that Rust is a good fit is the only way to be a good fit. I have heard for example that Go is a really good fit for agentic coding and I believe it: I think it hits a different sweet spot, one that helps agents iterate quickly (although I do suspect agents will let data races and subtle bugs slip through that Rust would have prevented). ↩︎The fact that agentic development makes more room for knobs is good for Rust performance, but it is quite likely an even better fit for performance in other languages. Tuning a GC has traditionally been a job that really requires a GC expert, but agents can likely fill that role pretty well these days. ↩︎On this pont, I’m even more convinced of the importance of ergonomic RC now that I work with agents. Agents are good at introducing the extra clones and things you need to deal with capturing around async tasks, but the resulting code is so annoying to read, it really hides what’s going on. ↩︎“Claude, this is not what we talked about!” – me, all too often. ↩︎So close though, right? I just .. couldn’t land the plane. ↩︎All too often, C++ libraries consider it adequate to tell users “you’re holding it wrong” – i.e., that they are responsible for causing undefined behavior by misusing the API. Rust takes a clear position that a safe API has to protect its users, no matter how much they abuse it. ↩︎To be fair, if Rust is encountering a stream of CVEs, other languages like C++ and Java are encountering a veritable flood, since they lack the protection of Rust’s type system.
st takes a clear position that a safe API has to protect its users, no matter how much they abuse it. ↩︎The revenge of .h files? ↩︎

The relevance of programming language design is continually being reassessed in the context of advancements like large language models, a shift that the author explores through the lens of Rust and agentic development. The author posits that while the basic act of coding remains constant, the rise of agents and LLMs necessitates examining how programming language design can evolve. The author believes there remains a significant role for humans in programming and language design, and further argues that Rust is a particularly strong foundation for agentic development, though it also suggests avenues for its improvement.

Rust’s popularity is fueled by its reputation for performance, which is amplified in the agentic era because the ease of experimentation allows agents to leverage Rust’s speed. This popularity is further reinforced by the fact that Rust naturally aligns with a philosophy of reliable software construction. The efficacy of this alignment stems from Rust's strong type system, which establishes a powerful guardrail—the principle that if code compiles, it is sound. The author draws an analogy to the idea that Rust, like other languages such as Haskell, embodies an “if it compiles, it works” philosophy, which agents can benefit from.

The creation of effective software is conceptualized across three pillars: Design, Construction, and Optimization. Rust excels in the optimization pillar by providing fast performance by default while retaining fine-grained control over performance through mechanisms that allow developers to tune memory allocation and pointer behavior. Agents are proving effective at this fine-tuning, capable of diagnosing performance pitfalls and optimizing code, such as debugging asynchronous performance issues, by combining analysis tools with code modification proposals. This synergy suggests a feedback loop where agents can enhance performance by interacting with profiling data, leading to a cycle where code is benchmarked, profiled, analyzed by an agent, and improved in a pull request.

The foundational strength of Rust for agents is rooted in its reliability. The type system acts as a crucial mechanism for keeping agents on track, providing guardrails that mitigate errors. While type systems are effective at preventing certain kinds of mistakes, the author notes their inherent limits: they indicate the absence of certain bugs but do not guarantee overall correctness, which requires a more advanced approach, such as proof systems. This leads to an exploration of incorporating tools like Verus, Creusot, and Aeneas to establish stronger guarantees about code properties.

To further enhance this reliability, the author advocates for Rust to pursue a north star of eliminating unsafe code by leveraging proof systems. This involves proving that unsafe code is safe and incapable of causing undefined behavior, allowing developers and agents to optimize performance more aggressively. The type system remains essential in this process, as it simplifies the task for proof systems by ruling out common errors, making the proof-checking process more reliable and faster.

However, the author also identifies areas where Rust’s design could be further enhanced. There is a need for the type system to become more expressive and functional so that agents are not constrained and forced to work around limitations. Furthermore, the experience of integrating proof tools needs improvement; existing methods relying on macros and pinned compiler versions are cumbersome. The author suggests pursuing an extensible compiler to better integrate theorem provers and other tools.

Regarding design, the author suggests that the current state of design processes, often relying on markdown-driven development, needs to be supplemented. There is a recognized need for dedicated modeling languages that allow humans to specify high-level designs and invariants to agents quickly, reducing the need to delve into low-level code initially. This addresses the challenge of capturing architecture at a high level for agents to process.

Ultimately, the conclusion emphasizes that Rust’s advantages for agentic development stem from its ability to provide strong default guarantees while retaining performance knobs, and its extensibility. The future direction involves evolving Rust to be even more expressive and functional, establishing proof-based safety as the standard, and facilitating a design process where human intent can be translated into effective, provable guardrails that agents can operate within. This evolution is seen as moving toward a paradigm where design languages guide the creation of robust software, allowing agents to execute tasks based on clear, provable specifications.