Jump to content

I Used Python for Everything — Until I Discovered Rust (2)

From JOHNWICK

Photo by Dima Pechurin on Unsplash

For most of my career, Python wasn’t just a tool — it was the tool.
APIs? Python. Automation? Python. Data scripts, CLI tools, web services, quick prototypes? Python, Python, Python. And honestly, it worked. Python was friendly. Python was fast to write. Python made me feel productive. So when I first picked up Rust, it was out of boredom more than necessity. A weekend curiosity. A “let me see what the hype is about” moment. But what happened next surprised me more than anything I’ve experienced in my developer life: Rust didn’t just feel fast. It felt… different. 
Like switching from a scooter to a superbike. Same destination, completely different world. This article is the story of that shift — why Rust caught me off guard, what it did better, what it did worse, and why Python still sits proudly in my toolbox (just not where it used to).

The First Shock: Rust Made Me Think Like an Engineer Again

Python lets you get away with a lot.
That’s part of its charm. But it also means you can write sloppy code and still convince yourself everything is fine — until it isn’t. Rust, in contrast, treats you like someone who wants to understand what’s actually happening. The borrow checker?
Ownership?
Lifetimes? At first, I thought they were barriers. In reality, they were guardrails. Rust forced me to slow down, to think about:

  • memory
  • concurrency
  • data flow
  • lifetimes of objects
  • what happens under the hood

The surprising part?
This made me a better Python developer. Once you’ve tasted the clarity Rust demands, you can’t unsee it.

When Performance Is Not Just “Nice,” but Game-Changing

I’ll keep this blunt:
Rust’s performance is absurd. I replaced a Python-based log processing script (using pandas and multiprocessing) with a Rust version as an experiment. The results:

  • Python: ~9 seconds
  • Rust: 0.3 seconds

I re-ran it five times because I thought my timer was wrong. And that’s when it hit me: Python is fast to write.
Rust is fast to run. That simple difference changes entire categories of what you’re willing to build. Suddenly, I started writing:

  • high-performance CLI tools
  • small web servers
  • concurrent data processors
  • batch job executors
  • file parsers that used to scare me

All in Rust, because why not? The speed felt addictive.

The “Ecosystem Surprise” No One Told Me About

Python’s ecosystem is legendary.
Rust’s? I assumed it was still “young.” And yet…
Crates.io feels like the GitHub of dreams. Need a web framework?

  • Axum
  • Rocket
  • Actix

Need async magic?

  • Tokio

Need to serialize data?

  • Serde (pure joy)

Need to write CLIs?

  • Clap
  • Structopt

Rust isn’t just “catching up.”
It’s carving out a category of its own — focused, polished, and surprisingly well-designed. And the documentation?
Clean. Thoughtful. Practical. It doesn’t feel like a young ecosystem.
It feels like a hungry one.

The Real Turning Point: Concurrency Without Fear

Python’s GIL has been debated for longer than I’ve been a developer. Rust’s model, in contrast, is simple: If your code compiles, your concurrency is probably safe. That is… wild. No race conditions.
No weird thread bugs.
No “it works most of the time” mysteries. Rust’s type system aggressively eliminates entire categories of concurrency issues before your program even runs. To a Python developer, that feels like cheating. I built a multithreaded file processor in Rust that handled millions of records per minute without drama.
Doing that in Python would’ve turned into a weekend-long debugging marathon.

But Python Isn’t Going Anywhere — And It Shouldn’t

Now, before the “Python is not meant for that” crowd shows up, let me make something clear: I still love Python. And I still use Python every single week. Here’s where Python continues to dominate:

  • Quick automation
  • Scripting
  • Data workflows
  • Prototyping
  • ML and AI
  • Web backends with tight deadlines

For anything involving complex logic, heavy compute, or concurrency?
Rust is my new first pick. Python is still my Swiss Army knife.
Rust is my power tool. Both are useful.
Just… in different kitchens.

What Rust Gets Wrong (Yes, There’s Plenty)

This wouldn’t be honest if I didn’t call out Rust’s flaws. Let’s be real: 1. The learning curve is painful Rust humbles you.
The compiler humbles you more. 2. Writing code is slower You think more.
You refactor more.
Your brain works harder. 3. Ownership rules can feel like solving puzzles Sometimes elegant.
Sometimes infuriating. 4. Ecosystem gaps exist Especially in ML and data science. 5. Developer onboarding is not trivial Your team needs time, patience, and buy-in. But the trade-off?
Once someone becomes productive in Rust, they’re dangerously productive.

The Beautiful Middle Ground: Python + Rust Together

Here’s the part I didn’t expect: The best use of Rust… is with Python. Python gives you:

  • speed of development
  • readability
  • libraries
  • glue code

Rust gives you:

  • performance
  • concurrency
  • safety
  • predictable execution

Thanks to tools like:

  • PyO3
  • Maturin
  • Rust-powered extensions
  • Polars (Rust core with Python API)

…you no longer have to choose. You can build the heavy parts in Rust and expose them as Python modules. And the result is magic:
Python ergonomics, Rust performance. This hybrid approach is slowly becoming my default for professional work.

What Rust Taught Me About Being a Better Engineer

The unexpected benefit of Rust wasn’t performance.
It wasn’t safety.
It wasn’t concurrency. It was discipline. Rust turned me into someone who:

  • thinks about memory
  • designs more intentionally
  • avoids sloppy patterns
  • reads error messages carefully
  • understands data flow instead of guessing
  • values correctness as much as productivity

It didn’t just change my code.
It changed my mindset. Rust feels like a mentor sitting beside you saying: “Slow down.
Think.
Do it right.” And Python?
Python feels like that optimistic friend saying: “Don’t worry! We’ll figure it out as we go.” I need both in my life.

So… Did Rust Replace Python for Me?

Not completely. But it replaced Python in areas I never expected:

  • Parsing large files
  • High-performance scripts
  • Anything needing threads
  • Systems-level tooling
  • Real-time data processing
  • CPU-intensive jobs
  • Background workers
  • CLI utilities

Python remains my favorite language.
Rust became my most trusted language. There’s a difference.


Final Thoughts: Use Rust Not to Replace Python, But to Reinvent Your Thinking

As a Python programmer interested in Rust, I’d like to say the following: Rust poses no danger to Python.
It’s a challenge to you. A challenge to level up.
A challenge to understand what computers are actually doing.
A Call to Build More Rapidly and More Effectively. Studying Rust doesn’t make someone a “Rust dev.”
This will make you a better engineer — independently of the final choice of language. Because once you’ve written Rust, every other language feels different.
Some better, some worse, all clearer. I received a new perspective, an enhanced mindset, and an altogether different joy through Rust. And that’s something no benchmark can measure.

Read the full article here: https://medium.com/the-pythonworld/i-used-python-for-everything-until-i-discovered-rust-5bc12176edff