DEV Community

Fernando Rodriguez
Fernando Rodriguez

Posted on • Originally published at frr.dev

The Best Thing That's Happened to Python in Decades Is Written in Rust

TL;DR: Python tooling has been a fragmented, slow mess for years. The revolution didn't come from within the ecosystem: it came from Rust. uv, Ruff and ty — all written in Rust by Astral — have replaced half a dozen tools and are between 10x and 100x faster. Looks like the Cult of Ferris had a point after all.


Have you ever tried to explain to someone how to install dependencies in Python?

"Use pip. Well, but inside a virtualenv. Or venv, which is the new thing. Though if you have multiple Python versions, you need pyenv. And for project management, use poetry. Or pipenv. Or pdm. Or conda if you do data science. Oh, and the lock file is generated by each tool in a different format. And don't forget setup.py. Well, now it's pyproject.toml. Well, sometimes both."

If this sounds familiar, you're not alone. Randall Munroe dedicated an xkcd strip to it in 2018 — a spaghetti diagram showing all the ways Python can be installed on your machine. Eight years later, the comic is still relevant. Or it was, until recently.

The Tool Graveyard

Let's take inventory. To set up a "modern" Python project before 2024, you needed to combine — at minimum — some selection of these pieces:

Tool Function
pip Install packages
virtualenv / venv Isolated environments
pyenv Manage Python versions
poetry / pipenv / pdm Dependency management and lock files
flake8 / pylint Linter
black / autopep8 Formatter
isort Sort imports
mypy / pyright Type checking

Eight tools — minimum — for what other ecosystems handle with one or two. Each with its configuration, its config file, its incompatibilities with the others. Installing poetry inside a virtualenv created by pyenv_ that in turn uses a Python installed by Homebrew which happens to have another globalpip` which... well, you get the idea.

And the worst part: every few years a new tool would appear promising to unify everything. Pipenv was going to be the solution. Then poetry. Then pdm. The xkcd standards comic coming to life on repeat: "We have 14 tools, this is absurd. I'm going to create a unified tool. Now we have 15 tools."

And Then Came a Crab

In 2022, a guy named Charlie Marsh — ex-Khan Academy and Spring Discovery — published a Python linter called Ruff. Written in Rust.

The Python community's reaction was predictable: "Great, another linter." Until they saw the numbers. Ruff was 10x to 100x faster than Flake8. Not 20% faster. Not twice as fast. A hundred times faster. In a large codebase, a linting run that took 30 seconds now took 300 milliseconds.

But Ruff didn't settle for being a fast linter. It ate Flake8, Pylint, isort, and Black. One tool, one binary, zero Python dependencies. It lints, formats, sorts imports. And it does it so fast you can run it on every keystroke in your editor without noticing any lag.

Charlie founded Astral to give the project structure. And he hired interesting people: among the team were the authors of ripgrep, bat, and hyperfine — Rust terminal tools that had already proven that rewriting classic utilities in Rust wasn't a meme, but an objective improvement.

uv: When pip Feels Like Dial-up

In February 2024, Astral dropped the bomb: uv. A Python package and project manager. Written in Rust.

In plain English: uv replaces pip, pip-tools, pipx, poetry, pyenv, virtualenv, and twine. Everything. One binary.

I know what you're thinking: "Yeah, yeah, another tool that claims to replace everything." But the numbers are mind-blowing:

Operation pip uv Speedup
Install dependencies (no cache) ~30s ~0.3s 100x
Resolve dependencies ~15s ~0.15s 100x
Create virtualenv ~2s ~0.01s 200x
Install (with cache) ~5s ~0.05s 100x

This isn't a synthetic benchmark. This is what you notice day-to-day. The pip install that gave you time to grab coffee now finishes before you let go of Enter.

And uv isn't just fast. It has reproducible lock files, cross-platform dependency resolution, integrated Python version management (uv python install 3.12 and done), and isolated script and tool execution (uvx ruff check .). What used to require five tools, uv does with one command.

ty: The Final Nail

As if uv and Ruff weren't enough, in December 2025 Astral published the beta of ty: a type checker for Python. Written in Rust.

The numbers, again, are obscene:

Tool Time on large codebase Speedup vs mypy
mypy ~60s 1x
Pyright ~6s 10x
ty ~1s 60x

After editing a file in the PyTorch repo, ty recalculates diagnostics in 4.7 milliseconds. Pyright takes 386ms. Mypy... better not ask.

ty has intersection types, advanced narrowing, and a language server with autocompletion, inlay hints, and code navigation. It's not a fast toy: it's a complete type checker that, additionally, flies.

The Table That Hurts

Let's put the numbers side by side. What you had before, what you have now, and how much faster it is:

Category Before (Python) Now (Rust) Speedup
Packages + envs pip + virtualenv + pyenv + poetry uv 10-100x
Linter Flake8 / Pylint Ruff 10-100x
Formatter Black + isort Ruff 10-100x
Type checker mypy / Pyright ty 10-60x
Isolated tools pipx uv tool (uvx) 10-100x

Five categories. Eight or more heterogeneous tools replaced by three that share ecosystem, configuration, and maintenance. All written in Rust. All from Astral.

It's Not Just Python: Ferris Eats the Terminal

And this isn't an isolated Python phenomenon. Look at what's happened with classic terminal tools:

Classic Rust Version Main improvement
grep ripgrep (rg) 2-5x faster, respects .gitignore
find fd Human syntax, ignores .gitignore
cat bat Syntax highlighting, Git integration
ls eza Colors, icons, Git info
diff delta Syntax highlighting, side-by-side
cd zoxide Learns your frequent paths

Each of these tools follows the same pattern: take a classic Unix utility that hasn't had a UX improvement in 30 years, rewrite it in Rust with modern defaults (colors, .gitignore, parallelism), and the result is so superior that people switch in an afternoon.

The irony is beautiful: the same developers who said "rewriting in Rust is a meme" are using ripgrep, bat, fd, and `eza_ daily. Without realizing it, the Cult of Ferris has converted them.

Shipping a Binary: The Ultimate Test

And then there's distribution. This is where the difference between Python and Rust goes from "notable" to "obscene."

In Python, to distribute a CLI to someone who doesn't have Python installed, you need: setup.py + setup.cfg + pyproject.toml (which one? all three, just in case), twine to upload to PyPI while praying authentication doesn't fail, PyInstaller or Nuitka or cx_Freeze to make binaries (that don't work), a 200-line CI workflow that nobody understands, manylinux wheels for each Python version, and in the end the user does pip install and it fails because they have Python 3.9 and you compiled for 3.12.

In Rust, this is what I did with lql, a CLI I just built:

git tag v1.0.2 && git push origin v1.0.2
Enter fullscreen mode Exit fullscreen mode

One command. Five minutes later: 6 binaries compiled for macOS (Apple Silicon + Intel), Linux (x86 + ARM + static musl), and Windows. Installers automatically generated: curl | sh for Mac/Linux, PowerShell for Windows, MSI for IT folks, and a Homebrew formula published to its tap. Everything, from a Git tag.

The binary weighs 4.7 MB. No runtime. No dependencies. Copy it and it works. Try doing that with Python without getting an ulcer.

The Kicker: The Student Surpasses the Master

Here's what really blew my mind.

The best tools that have happened to Python in the last decade — uv, Ruff, ty — aren't written in Python. They're written in Rust. The language that Pythonistas looked down on ("too complicated," "that's for embedded systems," "hellish borrow checker") turned out to be the one that fixed the problems Python couldn't fix for itself.

Why? Because the bottleneck for these tools isn't logic — it's pure performance. Resolving a dependency graph with thousands of packages, parsing millions of lines of code looking for errors, checking types in a hundred-thousand-line codebase. These are brute force problems where every millisecond counts, and where the difference between an interpreted language and a compiled one with zero-cost abstractions shows.

Python is great for writing software. But the tools that build, analyze, and maintain that software need the speed that Python can't provide. And Rust, with its memory safety, type system, and performance, turns out to be the perfect complement.

It's like your car being fantastic but the shop mechanics using plastic tools. One day someone gave them stainless steel tools, and it turns out the car runs just as well but the shop works ten times faster.

The Plot Twist: OpenAI Enters the Scene

If you thought the story couldn't get more interesting: on March 19, 2026 — a week ago — OpenAI announced the acquisition of Astral. The company behind uv, Ruff, and ty becomes part of the Codex team.

Astral has promised to keep the tools open source. But the move says a lot: OpenAI didn't buy Astral for the linter. They bought a team that knows how to build extremely fast development tools in Rust. And they want them to make AI agents write and manage code better.

The convergence is clear. The tools humans use to develop in Python (uv, Ruff, ty) and the tools AI agents use to write code (Codex) are going to share DNA. And that DNA is written in Rust.

What Do I Do Monday?

If you're not using uv yet, migration is trivial:

# Install uv
curl -LsSf https://astral.sh/uv/install.sh | sh

# Migrate an existing project
cd my-project
uv init                     # creates pyproject.toml if it doesn't exist
uv add requests flask       # adds dependencies
uv sync                     # installs everything in .venv
uv run python app.py        # runs inside the environment
Enter fullscreen mode Exit fullscreen mode

If you use Flake8, Black, or isort, replace them with Ruff:

uv tool install ruff
ruff check .               # linter
ruff format .              # formatter
Enter fullscreen mode Exit fullscreen mode

And if you're brave, try ty for type checking:

uv tool install ty
ty check .
Enter fullscreen mode Exit fullscreen mode

Three commands. Three tools. Goodbye to the nightmare of eight different configurations.

In the End, the Cult Was Right

I've been hearing "you should rewrite it in Rust" for years like background noise. The RIIR (Rewrite It In Rust) meme seemed like the mantra of a sect of evangelists in crab t-shirts. Keep at it, I thought, they'll get tired eventually.

They haven't gotten tired. And it turns out they had a point.

Not everything should be rewritten in Rust. But development tools — linters, type checkers, package managers, terminal utilities — are exactly the kind of software where Rust shines: performance-critical, frequently executed, zero tolerance for failures. And the results speak for themselves.

Python remains my language for writing software. But the tools I use to write that software are increasingly written in Rust. And they work better than everything Python built for itself in two decades.

Ferris the crab apologizes for the borrow checker. But in exchange, he gives you a `pip install_ that takes 300 milliseconds and actually works. I'd say that's a fair deal.

Top comments (0)