Editorial illustration for Rust Emerges as Top Programming Language for AI Labs, Karpathy Signals Shift
Rust Dominates AI Engineering: Top Labs' New Language Choice
AI labs favor Rust as engineers, highlighted by Andrej Karpathy’s recent note
In the fast-moving world of artificial intelligence, programming languages can signal deeper technological shifts. Rust is quickly becoming the go-to choice for top AI engineers, with its performance and safety features catching the attention of industry leaders.
The language's rise isn't just theoretical, it's happening in real-time at modern research labs. Engineers are increasingly choosing Rust for complex, performance-critical tasks that demand both speed and reliability.
One prominent voice amplifying this trend is Andrej Karpathy, a well-known figure in AI development. His recent work provides a compelling window into why Rust is gaining ground among serious technologists building next-generation AI systems.
The signals are clear: something is changing in how AI infrastructure gets built. Performance matters more than ever, and developers are voting with their code.
The same pattern shows up inside major AI labs. Andrej Karpathy provided one of the clearest signals late last year. While documenting experiments with AI-assisted coding, he mentioned building a tokeniser in Rust instead of relying on existing libraries.
Tokenisers sit directly on the performance path of every model. Choosing Rust there is a quiet admission that Python's convenience ends where correctness and speed begin. Even Elon Musk has publicly agreed that Rust is the language for AGI.
At OpenAI, the shift is explicit rather than implied. The Codex command line interface was rewritten entirely in Rust and released publicly. OpenAI said the Rust version is faster, more stable and easier to reason about as it scales.
Engineers pointed directly to Rust's guarantees as a reason. For autonomous agents that read and write files, manage tools and run unattended, that property matters far more than syntactic comfort. A similar learning curve is visible at Anthropic.
Engineers there have discussed learning Rust while building tooling around Claude, often with AI systems help them write the code itself. Rust is no longer treated as too difficult for fast-moving teams. AI assistance has flattened the learning curve enough that teams can get Rust's benefits without years of accumulated muscle memory.
Popular Meta apps, including Instagram and Facebook Messenger, utilised a decade-old C codebase for their messaging library, it led to problems with memory management and a subpar developer experience. In July last year, the company finally switched to Rust. On an episode of Meta Tech Podcast, three of the company's engineers, Eliane W, Buping W and Pascal Hartig, shared their experience with using C, discussing the challenges faced, the migration process and their success with Rust.
"I think one of the biggest things about Rust is the compile-time memory safety enforcement.
Rust's emergence in AI labs signals a profound technical shift. Top engineers like Karpathy are quietly moving away from Python's convenience toward a language offering more precision and performance.
The choice isn't trivial. Tokenisers represent critical infrastructure where speed and correctness matter most, and Rust appears perfectly positioned to meet those demands.
Karpathy's personal experiment - building a tokeniser from scratch in Rust - suggests more than casual interest. It represents a deliberate technical statement about where programming for advanced AI might be heading.
Even high-profile tech leaders like Elon Musk seem aligned with this perspective. The language's ability to balance low-level performance with strong safety mechanisms makes it compelling for complex computational tasks.
What's most intriguing isn't just the technical transition. It's the quiet, pragmatic way top AI engineers are making this shift - not through proclamations, but through actual code and practical buildation.
Rust isn't just another programming language. For AI labs, it might be becoming the language of serious, performance-critical development.
Further Reading
- Reviewing Six Major LLM Shifts in 2025 and Future Directions - Airosetta
- 2025 Recap: The Year the Old Rules Broke - AI Supremacy
- Simon Willison on andrej-karpathy - Simon Willison
Common Questions Answered
Why are AI engineers increasingly choosing Rust for performance-critical tasks?
Rust offers superior performance and safety features that are crucial for complex AI engineering challenges. The language provides both high-speed execution and strong memory safety guarantees, making it ideal for building critical infrastructure like tokenisers.
What significant signal did Andrej Karpathy provide about Rust's role in AI development?
Karpathy demonstrated Rust's importance by building a tokeniser from scratch in the language, signaling a deliberate move away from Python's convenience. His choice highlights Rust's superiority in performance-critical areas where speed and correctness are paramount.
How does Rust's performance impact critical AI infrastructure like tokenisers?
Tokenisers are a critical performance path for AI models, and Rust provides the necessary speed and precision for these essential components. By choosing Rust, engineers can create more reliable and efficient tokenisation systems that outperform traditional Python-based approaches.