Why Python Is Getting Rusty?
View Original ↗Python is becoming the steering wheel, and Rust is quietly becoming the engine.

In one sentence: You’ll keep writing Python, but more and more of the fast, always-running code underneath your import lines is now written in Rust, so your tools get quicker and crash less without you learning a new language.
First, what is Rust?
Rust is a programming language that runs about as fast as C, but checks your code for whole classes of memory mistakes before the program ever runs.
Here’s the picture to keep in mind for the rest of this post:
- Python is the steering wheel and the driver. It’s where you decide what happens: read this file, call that model, place this order in paper mode, plot that chart.
- Rust is the engine. You don’t touch it. You just notice the car is faster, quieter and breaks down less.
Literally, that means a Python library looks and feels like Python when you import it, but the heavy lifting inside is pre-built Rust code.
Three everyday words we’ll use a lot:
- Compiled: Python reads your code line by line while it runs, like a live translator. Rust is compiled: a tool translates the whole program into raw machine instructions ahead of time, like a book translated before it’s printed. More work up front, much faster reading later.
- Memory bug: a program keeps notes in the computer’s memory. A memory bug is when it reads a note it already threw away, or writes past the edge of its page. Results range from wrong numbers to crashes to security holes. Python protects you from most of these. C and C++ don’t. Rust does, and stays fast.
- Speed: here it means two things. How long you wait (a tool answering in a blink instead of a few seconds) and how much the machine burns doing it (CPU and memory, which on a server is money).
Where Rust already sits in your stack
You probably use Rust every day without knowing it.

- AI tools: the tokenizers that turn text into numbers for AI models (tiktoken, Hugging Face tokenizers) and the safetensors model-file format are Rust.
- uv, Ruff, pydantic-core, Polars: more on these below.
At the bottom, the GPU still runs CUDA C++. Rust isn’t replacing the maths on the graphics card. It’s replacing the plumbing around it.
The pattern behind all of it

Almost every project above follows the same three-layer recipe:
- A Python API. The functions you import and call.
- A bridge called PyO3. In plain words: a translator that lets Python and Rust hand data to each other.
- A Rust core, shipped as a pre-built package (a “wheel”, which is just Python’s ready-to-install file format). The common flavour is an abi3 wheel, meaning one file works across many Python 3 versions.
The result: pip install something and you're done. You don't need Rust installed. You never see it.
uv, Ruff and Pydantic, in plain words
If you only change three tools this year, make it these. Each is Rust underneath, which is why each feels instant.
uv: installs packages and manages your Python projects. Think pip plus venv (and pip-tools, pipx, pyenv, poetry) in one tool. It creates your project, installs Python itself, sets up the isolated environment, and locks versions so your code runs the same on every machine. The uv README calls it "an extremely fast Python package and project manager, written in Rust" and claims it's 10-100x faster than pip.
uv init my-strategy
uv add polars
uv run backtest.py
Ruff: checks and formats your code. It finds mistakes like unused imports (that’s “linting”) and tidies the layout (that’s “formatting”). It replaces Flake8, Black, isort and friends. The Ruff README says it’s “10-100x faster than existing linters (like Flake8) and formatters (like Black)”, with over 900 built-in rules.
ruff check .
ruff format .
Pydantic: checks that your data has the right shape. You describe what your data should look like with ordinary type hints, and Pydantic checks real input against it. If an API sends a price as "abc", you get a clear error instead of a silent bug. Since version 2, its engine is a separate Rust package called pydantic-core. The Pydantic docs say its "core validation logic is written in Rust" and that this makes it "among the fastest data validation libraries for Python."
Why Rust makes them feel instant: they’re compiled ahead of time, they can use all your CPU cores at once, and they don’t pay Python’s startup and per-line costs.
One more fact worth knowing: on 19 March 2026, OpenAI agreed to acquire Astral, the company behind uv and Ruff.
AI tools are going the same way
The same thing is happening in AI. Tools like OpenAI’s Codex CLI and GitHub’s Copilot agent runtime moved their always-running parts to Rust, while the AI models themselves are still built in Python with PyTorch. Python is where people experiment, and Rust is what runs nonstop underneath.
Why now? Safety stopped being optional
For years, the biggest source of serious security bugs has been memory bugs. Microsoft and the Chromium team have each reported that about 70% of their serious security bugs are memory-safety problems. Google says that as Android shifted new code to Rust, memory bugs fell below 20% of its vulnerabilities, with a 4x lower rollback rate and 25% less time in code review.
The Linux kernel dropped Rust’s “experimental” label in December 2025.
Rust is coming to Python itself

This is the part that justifies the title. Rust isn’t just around Python; it’s heading into CPython, the main Python program you run when you type python.
- Nov 2025: core developers Emma Smith and Kirill Podoprigora posted a pre-PEP, “Rust for CPython”. (A PEP is Python’s formal proposal process; “pre-PEP” means the draft before it.) It was narrowed to optional modules first. Guido van Rossum, Python’s creator: “Seriously, I think this is a great development… starting to introduce Rust initially for less-essential components, and then gradually letting it take over more essential components sounds like a good plan.”
- Mar 2026: Rust builds in the team’s fork and its automated test setup (CI).
- Sep 2026: at the Language Summit, the first module was named: zlib (compression), using the Rust zlib-rs backend with a C fallback.
- Dec 2026 / early Jan 2027: target for the actual PEP. No number yet.
- Python 3.16: the target release (beta May 2027, final October 2027).
- 3.18 at the earliest (2029+): the first point at which Rust could be required to build Python.
It’s not unanimous. Concerns include making it harder for new contributors (now you need to know two languages), and the risk at the border where Rust and C talk to each other, where Rust’s safety checks have to be switched off (Rust calls these sections unsafe). Steve Dower posted a firm -1. Healthy. Slow and optional is how you change a language millions depend on.
Meanwhile, Python is getting faster on its own too. Python 3.14’s free-threaded build is now officially supported (PEP 779). Plain version: normally Python lets only one thread run Python code at a time (that lock is called the GIL); the free-threaded build removes that lock so threads can truly run in parallel. It’s a separate build, and costs roughly 5-10% on single-threaded code. Python improving and Rust arriving aren’t rival stories. They’re the same story.
Rust isn’t magic
Time for honesty.
- Rust stops memory bugs, not logic bugs. Cloudflare’s 18 November 2025 outage came from Rust code: a feature file grew past its limit, and an unwrap() (Rust's "I'm sure this worked, crash if not") panicked. Safe language, wrong assumption, big outage.
- Compile times hurt. In the 2025 Rust Compiler Performance Survey, about 45% of people who’d stopped using Rust cited compile times. That “translate the whole book first” step costs you every time you change code.
- It’s harder to learn. Rust’s compiler is strict by design. Great for production, slower for a Sunday-afternoon experiment. That’s the onboarding worry in CPython too.
- Watch the hype. In December 2025, a Microsoft engineer’s post about eliminating C and C++ by 2030 went viral, then was clarified as a research project, not a plan to rewrite Windows. Headlines run ahead of reality.
Rust is a great engine. It’s not a reason to throw away the driver.
What this means for quant and algo traders
Trading code has the exact shape this pattern loves: you want to explore in Python, but the inner loops (indicators over years of candles, Greeks across a whole option chain, crunching tick files) need to be fast and never fall over.
That’s why we use the pattern in OpenAlgo’s own libraries.

- openalgo Python SDK 2.0.5 ships _oaindicators, a Rust core behind 100+ technical indicators.
- opengreeks 0.2.0 calculates option Greeks and implied volatility (Black-76, Black-Scholes and Black-Scholes-Merton) with a Rust core.
- wars 0.1.4 is a WhatsApp client for Python, built with PyO3 on top of whatsapp-rust.
All three ship as abi3 wheels. A wheel is a ready-to-install package, so pip just unpacks it. No compiling, and no Rust needed on your machine. “abi3” means one build works on every Python 3 version from the minimum it supports onward. You pip install them and write normal Python.
And it goes deeper than our own code. When we scanned OpenAlgo’s installed packages, 16 libraries had a Rust core:
- Ours: openalgo (indicators), opengreeks (options Greeks), wars (WhatsApp)
- Data and validation: pydantic-core, orjson, jiter, rpds
- Security: cryptography, bcrypt
- AI tooling: tiktoken, tokenizers, hf-xet, litellm
- Utilities: cramjam (compression), fastuuid, primp (HTTP client)
Most OpenAlgo users never notice. They just write Python.
Popular backtesting and trading engines are moving the same way:
- vectorbt now has an optional Rust engine. Install vectorbt[rust] and it uses Rust kernels where it can, falling back to Numba where it can’t.
- RaptorBT is a backtesting engine written in Rust with Python bindings. A full backtest finishes in under a millisecond on typical bar counts.
- NautilusTrader is a Rust-native trading engine. Rust runs the order matching, data handling and risk checks, while you write strategies in Python.
Practical takeaways, no Rust required:
- Use uv and Ruff today. Faster setup, cleaner code, fewer “works on my machine” problems.
- Use Pydantic for anything that arrives from outside (API responses, config files, webhook payloads). Bad data should fail loudly at the door, not quietly inside your logic.
- Try Polars or DuckDB for big data. Polars is a DataFrame library with a Rust core; DuckDB is a fast SQL engine you can run from Python. Both handle large candle and tick files comfortably on a laptop.
- Prefer compiled libraries for hot loops. If a calculation runs thousands of times per second, let a Rust-backed library do it, and keep your strategy logic in readable Python.
- Learn Rust only if you want to build the engine. Using these tools doesn’t require it.
(None of this is trading advice. It’s about tooling.)
The close
Python isn’t rusting away. It’s getting a better engine.
You still sit in the driver’s seat, writing the readable code that decides what happens. Underneath, the always-on, speed-critical layers are moving to Rust. At the very bottom, CUDA C++ still does the GPU maths.
So yes, Python is getting rusty. And it’s never run better.
If you build trading tools in Python, check out OpenAlgo, opengreeks and wars. Python on the outside, Rust where it counts.