Rust and Mojo Are Quietly Replacing Python's Low-Level Engine

Python stays on top, but Rust and Mojo are quietly replacing its low-level engine.
Python leads the language rankings, yet AI teams are silently replacing its internals. This article examines Python's speed limits and GIL, the two-language problem, how Rust is eating away at Python's infrastructure (Ruff, UV, Polars), and how Mojo is challenging CUDA's grip on GPU code—capped by Qualcomm's ~$4B acquisition of Modular.
The Paradox Behind Python Reaching the Top
Python has once again claimed the number one spot on programming language rankings—by the largest margin in history. The rankings referred to here are primarily popularity indices like TIOBE, which measure a language's popularity through multiple metrics such as search engine results, the number of online courses, and third-party vendors. Since Guido van Rossum released it in 1991, Python long existed in the humble role of a "glue language," until the data science and machine learning explosion of the 2010s finally propelled it to the throne. The reason it was able to soar on the AI wave is precisely that it lowered the barrier to entry into programming for researchers and analysts without a formal computer science background.
But there's a fascinating phenomenon at play: nearly every serious AI team is quietly replacing Python in its critical components.
This seems contradictory, but it actually reveals Python's true position all along—it was never the one actually doing the work; it's more like the steering wheel. When you train a model with Python, Python itself barely runs at all; it merely hands off the heavy mathematical computations to the underlying C and CUDA. And now, that "engine" is being quietly swapped out.
Here's an intuitive example: when you run pip install polars, what you're actually installing is a huge pile of Rust code. Today, your linter, package installer, and dataframe library—many of them are Rust running silently. And Mojo is eyeing the last piece of the pie that Python never truly touched: the GPU code itself.
Python's Two Original Sins: Speed and the GIL
To be fair, Python won the AI space for good reasons: it reads like plain English, it can glue together various tools, notebooks make data processing intuitive, and nearly every major library supports it. No one genuinely wants it to disappear.
But this friendliness comes at a cost, and that cost is speed. Pure Python runs slowly—the same loop is typically 25 to 100 times slower than in C. For web applications, you won't feel it, but for AI that needs to crunch billions of numbers, this is a brick wall.
The deeper problem is the GIL (Global Interpreter Lock). This lock ensures that only one thread can run at any given moment, no matter how many CPU cores you've bought. If you buy a 16-core CPU, standard Python will happily use just one of them, leaving the other 15 standing idle. This isn't laziness—the GIL is precisely what keeps those fast C extensions from corrupting each other's memory. Python traded the cost of "tying itself to a single core" for legendary simplicity, and this tacit agreement kept the entire ecosystem stable for 30 years.
You may not have noticed, but change is happening from within Python itself. In version 3.14, the free-threaded (no-GIL) build has officially graduated from experimental to supported. But every C extension needs to manually implement thread safety, so the real migration is a decade-long engineering effort. This isn't just a new feature—it's an acknowledgment of the status quo: the old model no longer works.
The Two-Language Problem: Freedom on a Leash
To get around the performance bottleneck, the entire ecosystem cleverly "cheated." In libraries like NumPy, PyTorch, and TensorFlow, the truly heavy lifting escapes Python entirely and sinks down to run in compiled C and CUDA. When you call PyTorch, more than 90% of it isn't Python at all—your code just points to the data and then waits for the results to come back.

This pattern has a name—the two-language problem: prototype in a simple language, then rewrite the slow-running core in a more complex one. Two languages, two skill sets, two codebases—one slip and they fall out of sync, and all the nastiest bugs love to hide in that fast-running low-level layer.
For the past 15 years, that low-level layer has mostly been CUDA, which only runs on NVIDIA hardware. CUDA (Compute Unified Device Architecture) is a parallel computing platform NVIDIA launched in 2007, allowing developers to use a C-like language to directly orchestrate thousands of computing cores on the GPU. GPUs were originally designed for graphics rendering, but their massively parallel architecture happens to fit the enormous matrix multiplications in deep learning perfectly. This is precisely why CUDA built NVIDIA's deepest moat—the underlying operators of most mainstream AI frameworks are optimized around CUDA, so even if a competitor builds a chip with comparable performance, it's hard to break the lock-in effect of this software ecosystem. And for the average developer, you can't directly inspect, fork, modify, or fix it. So Python gives you complete freedom at the top layer, but underneath sits a locked black box you're never allowed to open. This freedom is on a leash.
Rust Eats Away at Python's Infrastructure from Below
While everyone argues online about "Python vs Rust" as if you must pick a side, Rust has quietly slipped in through the side door and begun replacing Python's underlying infrastructure one piece at a time—all the boring but essential tools, with no fanfare launches. It simply started winning.
Why Rust? Because it rarely combines three virtues at once: it runs as fast as C, resolutely prevents memory corruption, and—most crucially—plugs into Python almost effortlessly via the PyO3 toolkit. A Rust core can hide behind a perfectly ordinary-looking Python package, and you won't even notice it when you pip install.
The "resolutely prevents memory corruption" part is no empty claim. Through its ingenious "ownership" and "borrow checker" mechanisms, Rust eliminates an entire class of classic bugs—null pointers, data races, memory out-of-bounds—at compile time, without relying on a garbage collector. This means it has C/C++-level runtime performance and fine-grained control over hardware, while avoiding the memory safety hazards that plague the latter. It's precisely this "zero-cost abstraction" property that has made Rust the "most loved language" in developer surveys for years running, and makes it the ideal tool for rewriting infrastructure.
The most representative example is the company Astral:
- Ruff (Linter): Replaced a dozen tools like Flake8, Black, and isort all at once, running 10 to 100 times faster. It can statically check the entire CPython codebase (hundreds of thousands of lines) in the blink of an eye, whereas the old tools needed nearly a minute.
- UV (Installer): Integrated the functions of virtual environments and Poetry into a single Rust binary, likewise delivering a 10 to 100x boost, and went from a novelty to the default in just one year.
- Polars: A Pandas alternative written in Rust, built on Arrow and a lazy query engine, running 10 to 20 times faster in practice and handling huge files that would crash Pandas on memory.

In addition, Pydantic rewrote its core in Rust for version 2, orjson is a fast JSON parser written in Rust, and Hugging Face's Tokenizers is likewise Rust. Step back and the pattern is almost funny: the dozen or so tools an AI developer touches every day—installer, linter, dataframe, parser, validator, serializer—now all have a Rust heart. The surface remains friendly Python; the low-level heavy lifting is done by Rust.

Even model training frameworks are starting to show pure Rust presences, such as Hugging Face's Candle and Burn—something that would have been sheer heresy in the past. An uncomfortable truth: you're running Rust every day; you just never noticed the low-level layer has already been replaced.
Mojo Launches an Assault from the Engine Room
As powerful as Rust is, it hasn't solved one core problem: writing the GPU code itself in a language that data scientists actually enjoy. Rust isn't "warm and fuzzy," and that gap is exactly why Mojo exists.
Mojo is by no means a toy project—it comes from Chris Lattner, the man who built the compiler infrastructure of Swift, LLVM, and Clang, which underpins roughly half the software you've ever run. This résumé is worth detailing: Lattner created LLVM during his academic career—a modular compiler intermediate-layer framework upon which nearly all modern compilers (including the backends of Swift, Rust, and Julia) are now built. He then led the development of the Swift language at Apple, and later worked at Tesla and Google Brain (responsible for TensorFlow infrastructure). This means Mojo isn't a fantasy: it inherits MLIR (Multi-Level Intermediate Representation, LLVM's next-generation evolution), capable of lowering high-level Python-style code layer by layer down to hardware-specific, maximally optimized instructions. His vision sounds almost greedy: write code that looks and feels like Python, with the same syntax, but that compiles to the speed of hand-optimized C and runs directly on the GPU. Let the easy-to-use language and the high-performance language finally merge into a single language.
Regarding speed, the "Mojo is 35,000 times faster than pure Python" figure published by Modular is a cherry-picked micro-benchmark—stay skeptical of that number. But in honest, real-kernel tests, it's roughly 10 to 100 times faster than pure Python—which is already enough to change the game.
More importantly, there's hardware portability. Mojo does what CUDA refused to do: write the math code once, then run it on any GPU—whether NVIDIA or AMD—without a rewrite.

According to the benchmark data cited by the video's author: on AMD's MI300X, the Modular stack's throughput was 53% higher than the industry gold standard vLLM; on another AMD chip, it matched, token by token, the performance of one of NVIDIA's most expensive H200s. The most astonishing part is portability—the same container image, the exact same code, deployed on AMD and NVIDIA GPUs without any modification, with no CUDA or ROCm porting needed—just swap the hardware. And you can call Mojo directly from Python, replacing only the hot-spot functions that slow things down, effectively adding an "acceleration switch" to your worst pain point.
Open Source and a $4 Billion Acquisition
Mojo also has honest shortcomings: it's still young, its toolchain is rough in places, and it hasn't accumulated Python's two decades of library ecosystem. It's a bet on the direction of the future, not a mature product you can ship tomorrow.
But Modular then played its key card—open-sourcing over 450,000 lines of production-grade GPU kernel code, fully public and free to read and fork. CUDA is a black box you can only rent, but this is software of the same caliber, with the hood flipped right open and handed to you.
It's precisely because of this that the ending lands so decisively: chip giant Qualcomm acquired Modular for around $3.9 billion, a price 2.5 times its valuation just a few months earlier. When a hardware company itself drops nearly $4 billion on a compiler, the direction of the bet couldn't be more obvious.
Python Won't Disappear, but a Belief Is Crumbling
To be clear: Python won't disappear. You'll still write code with it in the future—it's the interface, the glue, your first choice when you open a blank file.
What's about to die is a belief—the belief that pure Python can shoulder heavy computation on its own and stay fast, the belief that its core layer must be unreadable C and untouchable CUDA black boxes. It's precisely this notion that Rust and Mojo are quietly dismantling. Python has become the approachable face of this engine, and you can finally open the hood and take a look inside.
If you usually just call APIs, you don't really need to worry about these changes—your world won't be any different. But if you write hot loops, toolchains, or GPU kernels—the low-level parts that silently determine the size of your bill—then the foundation is undergoing a substantial shift. Learn a bit of Rust, and keep one eye on Mojo. Python built the AI era, but it can no longer carry the whole operation on its own.
Key Takeaways
Related articles

From Chat to Agent: Automating Your Entire Business Workflow with AI Agents
Veteran AI practitioner Remy breaks down the leap from chat models to AI agents: how agents work, the three pillars of context, tools, and skills, MCP connections, and hands-on architecture to make you a 100x employee.

Understand Anything: The AI Skill That Turns Code into Interactive Knowledge Graphs
Understand Anything is a high-star open-source GitHub skill that runs static analysis on any codebase and generates interactive knowledge graphs. It supports Claude Code, Cursor, Copilot and other agents, letting engineers ask questions in natural language with path references.

Kimi K3 Released: How a 2.8 Trillion Parameter Open Model Reshapes AI Cost-Effectiveness
Moonshot AI unveils Kimi K3: a 2.8 trillion parameter, 1M context, natively multimodal open model. With KDA architecture and ultra-low cost, it rivals GPT-5.6 and Fable 5, redefining AI cost-effectiveness.