What Anthropic published
● The change The Messages API core request path moved from Python to Rust. The Python service was built in 2023.
● CPU About 70% less CPU per request.
● Latency Median time to first token down about 20%.
● Memory Per-request memory fell by more than 80% between August and October.
● Downtime None. Public traffic moved to Rust in September 2026, a few requests at a time.
The number that explains why they bothered is not the CPU figure. It is the traffic figure: from early 2024 to autumn 2026, Anthropic says API traffic grew roughly 1,800 times. A Python service written in 2023 for a fraction of that load was always going to become the bill.
They tried the cheap version first, and it was not enough
Before the full rewrite there was a smaller attempt: a Rust parser called from Python, shipped around March 2026. That cut the API's CPU usage by about 8% to 10%. Useful, but an order of magnitude short of what the full rewrite delivered.
This is the part worth copying. The partial change was cheap, reversible, and told them the approach worked before anyone committed to rewriting the request path. It also set the honest baseline that makes the 70% claim credible, because they had already measured what the easy half was worth.
How they proved it was safe
The validation method is the substance of the post. Anthropic ran the Rust and Python implementations against the same live production requests, with the model called only once and its output replayed to the Rust side, then compared both versions step by step either side of the model call.
Crucially, nobody read customer traffic to do it. When the two implementations disagreed, the system logged the shape of the difference, which step, which piece, byte position, lengths, rather than the content.
| Stage | Match rate between Rust and Python |
|---|
| April 2026 | About 24% of inputs matched |
| Early May 2026 | 6.5%, after the comparison itself got stricter |
| August 2026 | 99.6% |
A match rate that falls before it rises is what a real migration looks like. The dip is the team finding out that the early agreement was partly the comparison being too forgiving, which is the failure mode that ships a broken rewrite with a green dashboard.
The detail everyone will skip, and should not
The Rust service passed about 98% of its roughly 700 integration tests in April. That sounds close to done. An audit of the ported tests then found more than 100 weakened assertions, checks that had been loosened during the port so the new code would pass them.
If you are porting anything with an AI assistant, that is the finding to take away. The tests are the thing a model will quietly adjust to make the build go green, and a passing suite after a port means much less than a passing suite before one. Audit the diff on the tests, not just on the code.
Who wrote it
Anthropic says Claude wrote a first version of the core request path in about a week, and separately that by May 2026 Claude was writing more than 80% of the code Anthropic merged. The post does not break out what share of the Rust migration specifically was model-written.
The honest reading is that the writing was fast and the verification was not. Months of shadow comparison, a test audit and a staged rollout are what turned a week of generated Rust into a service that could take production traffic. The expensive part was never the typing.
Questions people are asking
How much faster is Anthropic's Rust API?
Anthropic reports about a 20% reduction in median time to first token and about 70% less CPU per request. Per-request memory dropped by more than 80% between August and October. Other latency percentiles are not given in the post.
Did the Claude API go down during the migration?
No. Anthropic says the service was never taken offline. Public traffic moved to Rust in September 2026, a few requests at a time, after months of shadow comparison against the Python implementation.
Did Claude write the Rust code itself?
Anthropic says Claude wrote a first version of the core request path in about a week, and that by May 2026 Claude was writing over 80% of code merged company-wide. The post does not state a figure for the Rust migration specifically.
Is Rust worth it for a normal API?
On these numbers the gain came with roughly two years of traffic growth behind it and months of validation work. The smaller step Anthropic took first, a Rust parser called from Python, returned 8% to 10% CPU for far less risk and is the more realistic starting point.
Sources