Anthropic moves its Claude API to Rust and cuts CPU use by 70%
Anthropic tells that Claude wrote the new code in about one week, but proof that the code was correct was the large task.
Anthropic tells that it moved its Messages API, the primary point of access to Claude, from the Python language to the Rust language. The API stayed in use and work on new functions did not stop. The company tells that the new version uses about 70% less CPU for each call. Claude wrote the code in about a week. The proof was the large task.
How it works
Anthropic sent each call through the first code and the new code, and compared the results. Each difference left a small record with no customer content. Agents, which are AI software that does tasks, read the records and corrected the differences one at a time.
The numbers
Anthropic tells that the new API uses 80% less memory. It also tells that the median time to the first token is about 20% less. Traffic increased more than 1,800 times from the start of 2024 to fall 2026. The 700 first tests were not sufficient, because some of them accepted incorrect code. These results come from Anthropic only.
What is not known
The agents tried ideas fast, but only on calls that they wrote. A test in production, which is slow, found the things that they did not find. Anthropic gives no cost for the project and no count of the bugs.
Insight: Proof is now the slow part of a rewrite
Anthropic tells that Claude wrote more than 80% of the code that it merged by May 2026. A related report tells that its merges increased from around 2,500 each day in May 2026 to more than 30,000. The limit moved from the code to the proof of the code. A team with good proof can make large changes that other teams do not try. Your tests now have more value.
Sources
Posted