Accent colour
 
Shortcuts: press ?
 

Rust Explained — Why Developers Love the Language That Catches Bugs

Muhammad Tahir November 21, 2026

Introduction

Ask a group of programmers which language they actually enjoy using, and one name keeps coming up: Rust. It is not the easiest language. It is not the most popular one. It does not have Python's army of beginners or JavaScript's grip on the web. But year after year, the people who use Rust say they love it more than any other language — and that is strange enough to be worth understanding.

Rust has been voted the most admired language in Stack Overflow's developer survey every year since 2016. That is not a popularity contest. It is a question about which language developers who already use it would most like to keep using. Rust wins it, every time, by a wide margin.

The short answer is that Rust catches an entire class of bugs before your program ever runs. The bugs it catches are the nasty ones: the crashes, the security holes, the corrupted data that shows up at three in the morning on a server you cannot reach. It catches them by being strict — sometimes annoyingly strict — while you are still writing the code. Programmers complain about the strictness constantly. Then they ship software that works, and they go back for more.

This article explains what Rust is, why it was built, how its famous borrow checker actually works, what it feels like to write, and where it is used in the real world — including the operating system running on your phone.

Where Rust Came From

Rust started in 2006 as a spare-time project by Graydon Hoare, an engineer at Mozilla, the organisation behind the Firefox browser. Mozilla was in the middle of a problem that every big software company knew well: its browser was written in C++, and C++ lets programmers make a particular kind of mistake — memory mistakes — that turn into crashes and security holes. Mozilla wanted a language that was just as fast as C++ but made those mistakes impossible.

In 2009 Mozilla started funding the project properly. The goal was concrete, not academic: build a new browser engine, called Servo, in this new language, and prove that a browser could be both fast and safe. The first public release arrived in January 2012, and the first stable version, Rust 1.0, came out on 15 May 2015.

The browser engine took longer than anyone expected — they usually do — but parts of it made it into Firefox anyway. In 2017, Firefox 57, the release Mozilla called Quantum, shipped with a Rust component called Stylo, a CSS engine that styles web pages across all of a computer's processor cores at once. It was the first time a mainstream browser shipped Rust code to hundreds of millions of people, and it worked.

Then Rust did something rare for a language born inside one company: it outgrew its parent. Mozilla laid off much of its Rust team in 2020, and the language did not die. Instead, in February 2021, five big companies — Amazon Web Services, Google, Huawei, Microsoft and Mozilla — set up the Rust Foundation, an independent non-profit to look after it. A language that started as one engineer's side project was now being guarded by its biggest users.

The Borrow Checker, in Plain Language

Every explanation of Rust eventually arrives at the borrow checker, and every explanation of the borrow checker sounds intimidating. It does not have to be. The idea underneath it is something you already understand from everyday life.

Imagine a book in a library. There is one rule that matters: only one person can have the book at a time. If you have it, nobody else can take it, change it, or tear pages out of it. You can lend it to a friend — but then it is theirs, not yours, until they give it back. And you can let someone read over your shoulder while you hold it, but they cannot scribble in the margins while you are reading.

That is, roughly, how Rust treats data. Every piece of data in a Rust program has exactly one owner. When you hand the data to another part of the program, ownership moves — the old owner cannot use it any more. You can also lend data out, which Rust calls borrowing: you can lend it for reading, or lend it to one borrower for changing, but never both at the same time, and never while someone else is changing it.

The borrow checker is the part of the compiler that enforces these rules. It reads your code before it runs and checks every handover, every loan, every read. If two parts of your program could end up fighting over the same data, it refuses to build your program and tells you exactly where the fight would happen.

That sounds bureaucratic, and honestly, it feels bureaucratic the first time you meet it. But here is the thing the borrow checker is protecting you from: the two most common ways programs written in C and C++ go wrong. The first is using memory after it has been freed — like trying to read a book the library already threw away. The second is two parts of a program changing the same data at the same time, so the result depends on who got there first. These are called use-after-free and data races, and they are the bugs behind a large share of real security vulnerabilities.

In most languages, you find these bugs by testing, or by a user finding them, or by a security researcher finding them first. In Rust, the compiler finds them before the program exists. That is the whole trick. It is not magic. It is a strict set of rules, checked early, when fixing a mistake costs minutes instead of a security incident.

Memory Safety Without a Garbage Collector

There is a trade-off in programming that has been around for decades. On one side are the fast languages, like C and C++, which give you direct control over memory and no safety net. On the other side are the safe languages, like Python and Java, which watch over memory for you — usually with a garbage collector, a background process that tidies up memory you no longer need.

Garbage collectors are a good deal for most software. They are also not free. They pause your program while they work, they use extra memory, and they make timing unpredictable. That is fine for a web app. It is a problem for a game that has to draw sixty frames a second, or a brake controller in a car, or a database that cannot afford to stall. So the fast, dangerous languages have kept their jobs in those places, and the memory bugs have kept coming with them.

How big is the problem? In 2019, Microsoft reported that around 70% of its products' security vulnerabilities over the previous decade were memory safety bugs. Google reported a similar figure for Chrome. These are not careless programmers. They are some of the best engineering teams in the world, working in languages that let a single slip become a security hole.

Rust breaks the trade-off. It gives you the speed and control of C++, but it checks memory safety at compile time, before the program runs, instead of at runtime with a garbage collector. There is no background process tidying up. There is no pause. The compiler does the checking once, when you build, and the finished program runs without a safety net because it does not need one — the unsafe moves were already ruled out.

This is why people call Rust a systems language. It is built for the places where performance matters and failure is expensive: operating systems, browsers, databases, game engines, the software inside devices. It is the first language in decades to seriously challenge C and C++ on their own ground, not by being easier, but by being safer at the same speed.

What It Actually Feels Like to Write

Now the honest part. Rust is hard to learn, and anyone who tells you otherwise is selling something. Not hard in the way that, say, quantum physics is hard. Hard in the way a new set of traffic rules is hard when you have been driving for twenty years without them.

The first week is the worst. You will write code that you know is correct, and the compiler will refuse it. You will argue with the borrow checker about a variable you only used twice. You will read an error message three paragraphs long and wonder whether the compiler is being helpful or just showing off. Most Rust programmers have a story about the afternoon they spent fighting the borrow checker over something that would have taken five minutes in another language. The community even has a name for it: fighting the borrow checker.

Then something shifts. You start to notice that the compiler is usually right. The thing it would not let you do was, on reflection, a bit dodgy. The program you finally get to compile tends to work first time, or close to it. Programmers who have been through this describe the same feeling: the errors move earlier. Instead of a crash in production, you get a complaint on your screen while you are still sitting at your desk with a cup of coffee.

There are things that make the learning curve less steep than it looks. Rust's error messages are genuinely good — they point at the exact line, explain what went wrong in plain words, and often suggest the fix. The tooling is excellent: one command, cargo, builds your project, downloads its libraries, runs its tests and formats your code. And the community is famously welcoming to beginners, partly because everyone remembers how confusing the first month was. The ecosystem of shared libraries, called crates, is large and growing, and the package registry, crates.io, makes them easy to find and use.

Is it harder than Python? Yes, clearly. Python lets you write useful code on your first afternoon; Rust will still be arguing with you about ownership on your third. But the difficulty is front-loaded. The pain happens while you are learning, not while your users are running the software. That is a trade most professional programmers are happy to make.

Where Rust Is Used in the Real World

It is easy to dismiss a language as a hobbyist favourite. Rust is not. It is running in places you use every day, usually without you knowing.

  • Firefox. The browser it was built for. Rust code styles web pages and renders parts of them, and has done since Firefox 57 in 2017.
  • The Linux kernel. In December 2022, Linux 6.1 became the first release with Rust support merged in — the first language other than C ever allowed into the kernel in its thirty-year history. The goal is not to rewrite the kernel, which would be absurd. It is to let new drivers and modules be written in a language that cannot make the memory mistakes C keeps making.
  • Android. Google reported in 2022 that about 21% of all new native code in Android was being written in Rust, up from almost nothing a few years earlier. The code that guards your phone's stored keys and handles its Bluetooth connections is increasingly Rust.
  • Windows. Microsoft, the company that measured 70% of its vulnerabilities as memory bugs, has been rewriting parts of the Windows kernel in Rust, and Windows 11 ships with Rust code inside it.
  • Amazon Web Services. AWS built Firecracker, the tiny virtual machine engine that powers its Lambda serverless platform, in Rust. When a million strangers' functions run on the same hardware, the language holding them apart had better be safe.
  • Discord and Figma. Discord rebuilt parts of its messaging service in Rust to handle millions of simultaneous users. Figma, the design tool, rewrote its multiplayer server — the part that lets several people edit the same drawing at once — from TypeScript to Rust, because the old version could not keep up.

That list is the strongest argument for Rust there is. It is not a list of experiments. It is the operating systems, browsers and services that the rest of the software world stands on, and they are all moving, piece by piece, toward the same language. None of them switched because Rust is fashionable. They switched because the bugs Rust prevents are the bugs that cost them the most.

Rust vs C++, Python and Go, in Plain Terms

Choosing a language is always a comparison, so here is the honest one.

Against C++, Rust is the closest contest. Both are fast, both give you control over the hardware, and both are used for the same jobs: operating systems, game engines, browsers, databases. The difference is the safety net. C++ trusts you. It assumes you will manage memory correctly, and it punishes you quietly when you do not — a crash, a security hole, a bug that only shows up under load. Rust does not trust you. It checks everything in advance and refuses to build a program with a memory bug in it. The price is the learning curve and the occasional argument with the compiler. The reward is software that is much harder to break. For a new systems project in 2026, Rust is the default choice for most teams that have tried both. C++ still wins where there is a huge existing codebase, or where the team already knows it inside out — rewriting millions of lines of working C++ is rarely worth it.

Against Python, the comparison is simpler: they are built for different jobs. Python is the language you reach for when you want something working this afternoon — a script, a data analysis, a web service, a prototype. Rust is the language you reach for when the thing has to be fast, or has to run for months without restarting, or has to be safe enough to trust with other people's data. Python is easier to learn and faster to write. Rust is faster to run and harder to break. Many teams use both: Python on the outside, where humans interact, and Rust on the inside, where the heavy work happens.

Against Go, the comparison is about what each language values. Go, Google's language, values simplicity. It has a garbage collector, it is easy to learn, and it is very good at network services and cloud tools. Rust values control and safety. It is harder to learn, but it runs faster, uses less memory, and has no garbage collector pauses. If you are building a web API or a cloud service, Go will get you there sooner. If you are building a database, a browser engine or a device driver, Rust is the better tool.

Who Should Learn It — and Who Should Wait

Rust is not for everyone, and not yet. It is worth learning if any of these sound like you:

  • You write software where a crash or a security hole is expensive — systems tools, servers, embedded devices, anything that handles other people's data.
  • You already know a language like C++ or Go and you want the next step up in safety without giving up speed.
  • You work on performance-critical code and you are tired of choosing between fast and safe.
  • You are curious about how computers actually work, and you want a language that teaches you while you use it.

And it is worth waiting if any of these sound like you:

  • You are learning your very first language. Start with Python or JavaScript, get comfortable, and come back to Rust later. The ideas will make more sense once you have written real programs.
  • You need to build a simple website or automate a spreadsheet this week. Rust will slow you down, and the safety it offers is not what that job needs.
  • Your team and your codebase are already in another language and working well. Rust is a good tool, not a religion. Switching languages is expensive, and it should be a decision, not a fashion choice.

The learning curve is real, but it is also well mapped. The official book is free, the compiler's error messages teach as they correct, and the community answers beginner questions with unusual patience. Most people who stick with it for a month say the same thing: the first two weeks are the worst, and after that the language starts to feel like it is on your side.

Conclusion

Rust began as one engineer's spare-time project and became the language that the biggest software systems on earth are quietly moving toward. It did not get there by being easy or by being fashionable. It got there by solving a problem that had been accepted as the price of fast software for fifty years: that memory bugs are inevitable, that crashes and security holes are the cost of performance.

That is why developers love it. Not because it is fun — although many of them say it is — but because it moves the pain to where it belongs: to your desk, while you are writing, instead of to your users, at three in the morning. A language that catches your mistakes before anyone else sees them is a language worth learning, even if it argues with you first.

Frequently Asked Questions

Is Rust hard to learn? Yes, honestly, harder than Python or JavaScript. The first few weeks are the steepest part, because the borrow checker forces you to think about ownership — who holds each piece of data — in a way other languages never ask you to. Most people who stick with it say the difficulty is front-loaded: the pain happens while you are learning, and the programs you write afterwards tend to work first time.

Is Rust faster than Python? Much faster, usually tens of times faster for the same task, and it uses far less memory. But that is not really a fair comparison. Python is designed to be quick to write; Rust is designed to be quick to run. Python is still the better choice for a script, a data analysis or a prototype you need this afternoon. Rust is the better choice when the program has to be fast, run for a long time, or handle work where a crash would be expensive.

Can Rust replace C++? For new projects, often yes, and many teams are making that choice. Rust is as fast as C++ and far safer. But it will not replace C++ everywhere. There are decades of working C++ code in the world — operating systems, game engines, banks — and rewriting it all would be a huge, risky job for little benefit. The realistic picture is a slow shift: new components in Rust, old components staying in C++ until they need replacing.

Does Rust have a garbage collector? No, and that is one of its main selling points. Rust manages memory through its ownership rules, checked by the compiler before the program runs. There is no background process pausing your program to tidy up memory, which is why Rust works well for games, device drivers and anything that needs predictable timing.

Should I learn Rust as my first programming language? Probably not. Rust is a demanding first language, and you will spend a lot of time fighting the compiler about things that have nothing to do with the problem you are trying to solve. Start with Python or JavaScript, learn the basics of programming — loops, functions, data — and come back to Rust once you have written real programs. It will make much more sense the second time around.

Was this article helpful?

Muhammad Tahir

Author

 

Get new articles by email

 

Comments