What agents mean for Rust (and vice versa)
TL;DR Highlight
Rust's designer argues agent coding calls for stronger types and proofs, not less language design.
Who Should Read
A backend developer using AI agents to write code who is deciding which language and guardrails to rely on.
Core Mechanics
- Rust popularity is surging in the agent era
- The author quotes David Tolnay.
- Meta engineers wrote twice as much first-party Rust this year as in the previous 9 years combined.
- Agents are good at performance tuning
- The author says crypto developers who hand-tuned assembly now use agents for that work.
- With a profiler like dial9, agents reportedly diagnose async pitfalls like long polls and blocking.
- Tests alone can't keep agents in check
- The author's first few tests look fine, then the agent turns out to have missed the logic entirely.
- A type system acts as a guardrail against certain kinds of mistakes.
- After types, you need proofs
- Types prevent wrong things but don't show the right thing is done.
- Rust proof tools like Verus, Creusot, Aeneas and Kani can check richer properties.
- Types make proofs easier
Community Reactions
- Compile time is Rust's weakness, some say
- One commenter expects a language or Rust redesign with fast compilation in the LLM era.
- Another reports the target/ folder grows huge with agents and disk space runs out.
- Agents write Verus proofs well, per one commenter
- A commenter had agents write Verus proofs in a Rust codebase and found it worked well.
- The proofs reportedly had minimal effect on the normal compile path.
- A list of LLM-friendly language traits
- A commenter listed useful compile errors, fast compilation, explicit types and one preferred way to do things.
- They also suggested pre/post-conditions and mandatory tests.
- Pushback: little evidence Rust is special
- One commenter researched and found no strong correlation between language features and agent coding success.
- Apart from popularity, even types showed no clear correlation.
- Another commenter simply dislikes agentic coding.
How to Apply
- Run a profile-driven tuning loop with an agent
- Today, run a benchmark on a Rust service and capture the profile.
- Give the output to an agent and ask for bottleneck causes and a fix as a PR.
- Strengthen guardrails with types
- Wrap values agents often confuse (IDs, units) in newtypes.
- Instruct the agent to change code only within what still compiles.
- Try Verus proofs on a core function
- Start by having the agent prove the function is panic-free.
- Then add assertions confirming the expected result.
- Review interface changes separately
- In agent PRs, check public signature changes first.
- Read the implementation diff afterward.
Try It
# Paste into Claude Code or ChatGPT (simplified version of the article's idea: profile-driven tuning loop)
You are a Rust performance tuning agent. Analyze the profile results below.
{{profile results or benchmark output}}
Rules:
1. Name up to 3 bottleneck candidates with evidence.
2. Propose a code fix for each.
3. Behavior must not change. Existing tests must pass.
4. Reduce unnecessary clone() calls, but keep the code's intent readable.
Next step: after the fix, rerun the same benchmark, paste the results, and ask for a comparison.Terminology
Related Papers
Same Simulation, Different Evidence: Where Retrieved Tool Output Costs LLM Agents Accuracy
Saving long tool output to files cut GPT-5.1 accuracy by 11.3 points; naming the authoritative file restored it.
Fake News, Real Crashes: Information Injection Attacks on LLM Financial Trading Agents
Fake headlines hijacked LLM trading agents 62% of the time versus 14% for prompt injection.
Harness Engineering 101: The LLM is the brain, the harness is the body
An agent is a loop managing a JSON array; 16 chapters build one from scratch
Harness2 by Google Research – Recursive Agent Harnessing
Recursively refining the harness with fixed model weights raised benchmark scores by up to 11.8 points.
Ousted Savannah police officer gave ICE agent husband access to Flock system
A police officer shared her Flock login with her ICE-agent husband; an audit found 983 searches and she was fired
Tmux and Claude Code: Sessions, Send-Keys, and the Ceiling
Running Claude Code agents in tmux works well, but limits appear around four agents.