Rust:SystemsLang
A modern systems language that resolves three decades of C/C++ memory bugs in a single compile-time discipline called ownership — no garbage collector, no virtual machine, performance on par with C++. Once dismissed as "the borrow checker yells too much," eleven years later half the world's tooling — from the Linux kernel to Windows internals to Python's package manager — is being rewritten in it.
9 yrs incubation at Mozilla
2016 — 2024 streak
2015 / 2018 / 2021 / 2024
Python package manager
What is Rust
Rust is a compiled systems language targeting the same ground as C and C++. Its central bet: "memory safety and data-race safety, statically, at compile time, with no garbage collector and no runtime." Three decades of "you can have safety or performance, pick one" gets traded for a discipline called ownership — and it works.
Every value has exactly one owner; the moment the owner leaves scope, the value is freed. Not a tracing GC — the compiler counts line numbers.
Either many shared &T references or exactly one &mut T. That single rule eliminates entire classes of "two threads writing the same memory" bugs.
Generics, traits, iterators, async/await — all monomorphised at compile time. The output binary is as tight as hand-written C.
Option<T> forces you to handle "absent" explicitly. The compiler will not let you pretend a value can't be None — Tony Hoare's billion-dollar mistake closed at the source.
std::string* make_user() {
auto name = new std::string("Graydon");
return name;
}
// caller
auto* u = make_user();
printf("%s\n", u->c_str());
// forgot to delete? leak.
// delete twice? use-after-free.
// fuzzer finds it half a year laterfn make_user() -> String {
String::from("Graydon")
}
// caller
let u = make_user();
println!("", u);
// u owns the String here.
// scope ends → freed automatically.
// compiler guarantees no leak,
// no double free, no GC.History : Timeline
From Graydon Hoare's 2006 side project, through Mozilla sponsorship and the Servo browser-engine experiment, to a 1.0 release that's now feeding kernels at Microsoft and Linus' tree — a "C++ done right" story spanning twenty years.
- 2006
Graydon Hoare's side project
Mozilla engineer Graydon Hoare begins Rust on his own time. Lore says it started after the elevator in his apartment building — an embedded C++ system — rebooted yet again from a memory bug. "Why is the language we write elevators in still this fragile?"
- 2009
Mozilla sponsors the project
Mozilla makes Rust an official research project and assigns a team. The eventual goal: a new language for the next-generation browser engine, Servo. Early Rust looked nothing like today's — it had a GC and green threads.
- 2012·01
0.1 released
The first numbered compiler ships. Syntax is far from final, but the core idea — ownership and borrowing — is taking shape. The GC is incrementally removed, finally dropped in 2013, with all memory management handed to the ownership system.
- 2013
Graydon steps down — type system overhaul
Hoare leaves Rust leadership. From 2012 to 2015 the type system is essentially rebuilt: ownership generalised, lifetimes made explicit, green threads removed — all to slim the language down for 1.0.
- 2015·04
Aaron Turon's "Fearless Concurrency"
One month before 1.0, core team member Aaron Turon publishes Fearless Concurrency with Rust. The phrase becomes a defining slogan: ownership doesn't just stop memory bugs, it also rules out data races by construction.
- 2015·05·15
1.0 stable
The Rust team ships Rust 1.0. Every feature on stable is now under a backwards-compatibility promise. The Rust community treats this date as the language's birthday — celebrated as the 10-year anniversary in 2025. Edition 2015 lands alongside.
- 2018·12
Edition 2018 + module system rework
Rust 1.31. The Edition mechanism debuts: breaking syntax improvements ship in editions, old crates stay on 2015, new crates opt into 2018, and they link together cleanly. New module paths and the
asynckeyword reservation arrive here. - 2019·11
1.39 — async/await stabilised
November 7.
async fn/.awaithit stable Rust. Runtimes (tokio, async-std) live in the ecosystem, while only theFuturetrait is in std. Overnight Rust becomes a viable choice for high-performance async server work. - 2021·02
Rust Foundation founded
February 8. After Mozilla's 2020 layoffs, Rust formally moves out of Mozilla into a new independent non-profit, the Rust Foundation. Founding corporate members: AWS, Google, Microsoft, Mozilla, Huawei. The language is no longer tied to a single company.
- 2021·10
Edition 2021
Rust 1.56. Disjoint closure capture,
IntoIteratorfor arrays, panic macro consistency, and a dozen smaller adjustments. The three-year edition cadence is now established. - 2022·12
Linux kernel 6.1 accepts Rust
December 11. Linus Torvalds merges initial Rust infrastructure into mainline. The Linux kernel admits a second language for the first time in three decades. Subsequent releases steadily add more subsystem abstractions and drivers.
- 2023·08
Discord rewrites Read States: Go → Rust
Discord publishes a now-famous engineering blog: their Read States service moved from Go to Rust because Go's GC caused regular two-minute latency spikes they couldn't engineer away. After the Rust rewrite, P99 stays in microseconds. The post becomes the canonical "Rust replacing Go" reference.
- 2024·02
Microsoft Azure CTO bans new C/C++
Mark Russinovich publicly states new projects should use Rust, not C/C++. Windows kernel ships with DirectWriteCore (~150K lines) plus Win32k/GDI Region rewritten in Rust. The driver: "memory errors account for ~70% of Microsoft security vulnerabilities."
- 2025·02
Rust 1.85 + Edition 2024
February release. The largest Edition delta yet — async closures,
letchains, new lifetime capture rules. May 2025 marks the 10-year anniversary of 1.0. Stack Overflow's 2024 survey: Rust takes the most-admired crown for a 9th consecutive year.
Language essentials : RustEssentials
Rust isn't "C++ with types." Its fundamental abstractions are different: ownership, borrowing, lifetimes. Learn these eight pieces and 90% of Rust's compiler messages start to read like helpful advice.
Ownership : ownership
Each value has exactly one owner. When the owner leaves scope, the value is dropped. Assignment is move by default — the previous binding becomes invalid.
let s1 = String::from("hi");
let s2 = s1; // move
// println!("{}", s1); ✘ compile error
// s1 has been moved into s2Borrowing : & / &mut
Many &T or exactly one &mut T. That exclusivity rule statically forbids data races.
let mut v = vec![1,2,3];
let a = &v;
let b = &v; // ✓ many shared
// let c = &mut v; ✘ shared borrow existsLifetimes : 'a
A reference must outlive nothing it points to. The compiler infers most lifetimes; 'a annotations only show up when signatures need disambiguation.
fn longest<'a>(
x: &'a str,
y: &'a str
) -> &'a str {
if x.len() > y.len() { x } else { y }
}Traits + generics
No inheritance — just traits and generics. A trait is a behaviour contract; generics monomorphise at compile time, so dispatch is static and inlinable.
trait Area {
fn area(&self) -> f64;
}
struct Circle { r: f64 }
impl Area for Circle {
fn area(&self) -> f64 {
3.14 * self.r * self.r
}
}Result + Option
No exceptions, no null. Errors are values. Missing-ness is a value. The ? operator collapses "propagate on error" into a single character.
fn read(p: &str) -> Result<String, io::Error> {
let mut f = File::open(p)?; // early-return on Err
let mut s = String::new();
f.read_to_string(&mut s)?;
Ok(s)
}Pattern matching : match
Exhaustiveness is enforced. Combined with enums, Result and Option, "I forgot to handle case X" stops being possible.
enum Shape {
Circle(f64),
Square(f64),
}
match s {
Shape::Circle(r) => 3.14*r*r,
Shape::Square(s) => s*s,
}async / await
Syntax familiar from JS / C#, but no runtime is bundled — you pick tokio, async-std, or roll your own. Futures are lazy: nothing happens until .await.
async fn fetch(u: &str) -> Result<String> {
let r = reqwest::get(u).await?;
Ok(r.text().await?)
}unsafe blocks
Rust isn't naïve — FFI, raw pointers, and SIMD still need unsafe. But the unsafe surface is bounded inside explicit blocks, so audit cost is orders of magnitude smaller than auditing an entire C codebase.
unsafe {
let p = libc::malloc(128);
// I take responsibility here.
libc::free(p);
}"The borrow checker is a teacher"
Week one with Rust: you fight the borrow checker. Week two: you start agreeing with it. Week three: you instinctively reach for ownership concepts when reasoning about concurrency in other languages.
"If it compiles, it probably runs correctly." — the most-quoted Rust slogan, with surprising practical accuracy.
Why use : WhyRust
Not because it's new — it's eleven years old. Because in the performance / safety / concurrency triangle, it's the first language that doesn't require you to trade one for another.
Performance on par with C++
No GC, no VM, no runtime. LLVM backend shared with Clang. On real workloads — Pingora, ripgrep, Polars — Rust runs neck-and-neck with C++, and one to two orders of magnitude faster than Go or Python.
// Output is one static binary.
// No deps beyond libc.
// scp it to a box and run.Memory safety at compile time
Use-after-free, double-free, dangling pointers, buffer overflows — the bugs that have plagued C/C++ for thirty years are rejected by cargo build before you can ship. Microsoft's data: ~70% of their security vulnerabilities are memory errors.
// error[E0382]: borrow of moved value
// --> src/main.rs:5:20
// caught here, not in productionFearless concurrency
Two marker traits, Send and Sync, turn "can this cross threads?" and "can this be shared?" into compile-time questions. Data races are ruled out statically — no synchronized sprinkles needed.
// std::thread::spawn requires F: Send.
// Tried to pass Rc<T>? Compiler: nope.
// Use Arc instead.cargo: one toolchain to rule them all
Package management, build, test, docs, benchmarks, cross-compilation — one cargo command for all of it. crates.io as a central registry with semver. None of the "manage 100 CMake files by hand" pain of C++.
cargo new myproj
cargo add tokio
cargo test
cargo doc --openNo null, no exceptions
Option<T> forces handling of absent values; Result<T,E> forces handling of failure. The ? operator makes propagation as light as Python, but you cannot silently swallow an error.
match parse_int(s) {
Ok(n) => use_it(n),
Err(e) => log(e),
}Best-in-class diagnostics
Rust's compiler errors come with squigglies, suggested fixes, and links to relevant docs. Community wisdom: "If the borrow checker yells, do what it says." C++ template error messages cannot compete here.
error[E0596]: cannot borrow `v` as mutable
help: consider changing this to be mutable
let mut v = ...
+++WebAssembly first-class
cargo build --target wasm32 compiles to wasm. No GC overhead, tiny binaries, fast load — Figma, 1Password, Discord desktop all use Rust + wasm to push performance-critical paths into the browser.
// wasm-bindgen exposes Rust fns to JS
// runs at near-native speed in browsersFriendly FFI = gradual adoption
You don't need to rewrite everything. Mozilla, Dropbox, Cloudflare and Microsoft all embed Rust into existing C/C++ codebases via the C ABI. This incremental path is why Rust actually lands inside large companies.
extern "C" fn my_export() {
// callable from C/C++
}Cross-platform single binary
The build artifact is a static binary. No JVM, no Python interpreter, no node_modules. This is why ripgrep, fd and bat install with "download and run" — while a Python linter still wants you to spin up a venv first.
# copy a single file
scp ./mybin user@host:~/
ssh user@host ./mybinWho's using it : ProductionUsers
From kernels to browsers to CDNs to Python tooling — most of these twelve projects are infrastructure you're using right now without realising it.
The Rust rewrite era : TheRewriteEra
Starting around 2023, a wave of "Rust rewrites of mature tools" has reshaped entire ecosystems. Python package managers, JS bundlers, CSS processors, dataframe libraries, terminal utilities — established tools have been rewritten in Rust, and 30-100× speedups are routine. Not hype; actual production deployments.
"New projects at Microsoft should not be starting in C or C++. They should be using Rust. Memory-safety errors account for ~70% of the security bugs we see, and that number has been stuck for seven years. We can't keep treating "the programmer just needs to be careful" as an engineering plan.
Astral's package manager. With a warm cache, installs run 80-115× faster than pip. A single uv pip install replaces pip / virtualenv / pyenv / poetry / pipx. Python's "package manager wars" are essentially over.
Cloudflare's Rust-based HTTP proxy now handles over 1 trillion requests per day. Same traffic uses 70% less CPU and 67% less memory than the old setup. Open-sourced under Apache 2.0 in early 2024.
From 2016 to 2024, Rust has held the #1 spot on Stack Overflow's developer survey for "most loved" / "most admired" language for nine consecutive years. The 2024 survey: 83% of users want to keep using it.
uv
In early 2024, Astral (the Ruff team) released uv. Functionally identical to pip — install packages, resolve dependencies, manage venvs — but written in Rust, with parallel downloads and aggressive caching:
- No cache: 8-10× faster than pip / pip-tools
- Warm cache: 80-115× faster than pip / pip-tools
- venv creation: 80× faster than
python -m venv - Single static binary, installs without Rust or Python on host
- Replaces pip / pip-tools / pipx / poetry / pyenv / twine / virtualenv
By 2026, new Python projects overwhelmingly start with uv. It's the cleanest single example of "Rust rewriting an established ecosystem and winning."
# install uv itself
$ curl -LsSf https://astral.sh/uv/install.sh | sh
# create project, add deps
$ uv init myapp && cd myapp
$ uv add fastapi uvicorn
Resolved 24 packages in 12ms
Installed 24 packages in 38ms
# compare: same operation with pip
$ pip install fastapi uvicorn
... 4.2 seconds ...
# the 100× isn't marketingThe Rust rewrite roster · two dozen tools currently reshaping their domains
AI infrastructure is going Rust underneath
Inference and data pipelines look like Python on the surface, but the hot paths are increasingly Rust. Hugging Face's tokenizers, Polars, candle, vllm's critical kernels — all leaning on Rust for the inner loop.
The reasoning is straightforward: Python is pleasant to write but cannot meet the throughput demands of LLM-era workloads. Go gets bitten by GC tail latency (see Discord). C++ is hard to maintain and expensive to staff for. Rust is the current best middle ground.
So the AI stack settles into a layered shape: Python on the outside for prompts and glue, Rust in the middle for performance. PyO3 + maturin handles the FFI seam; from the user's perspective it's still pip install.
// Example: Hugging Face tokenizers
// Python user:
>>> from tokenizers import Tokenizer
>>> tok = Tokenizer.from_pretrained("bert-base-uncased")
>>> tok.encode("hello").tokens
// What's actually running:
use tokenizers::Tokenizer;
pub fn encode(text: &str) -> Encoding {
// SIMD-accelerated BPE
// 50-100× faster than the pure-Python impl
}
// Exposed to Python via PyO3.
// Users never realise the work is Rust.One-line summary: Rust isn't trying to replace Python — it backstops the layers Python can't keep up with. It isn't trying to replace C++ — it replaces the parts of C++ that crash. It isn't trying to replace Go — it replaces the Go services where GC pauses tank the P99. This is the largest systems-software rewrite of our era, and it's well underway.
Comparison : Rust vs C++ vs Go
The three languages overlap in some places and diverge in others. Where they overlap — systems and server-side — Rust has been quietly carving out territory from both C++ and Go.
| C++ | Go | Rust | |
|---|---|---|---|
| Memory mgmt | Manual / RAII / smart ptr | GC (millisecond pauses) | Ownership + borrow, compile-time |
| Memory safety | Not guaranteed | Yes, except unsafe.Pointer | Statically guaranteed in safe subset |
| Data races | Not prevented | Not prevented (race detector is a tool, not a rule) | Statically prevented via Send/Sync |
| Performance | Top tier | Mid-high (GC affects tail latency) | Top tier, on par with C++ |
| Concurrency | std::thread + mutex | Goroutine + channel (built-in) | std::thread + async/await + channel |
| Async runtime | None standard | Built in (goroutine scheduler) | Library choice (tokio / async-std) |
| Error handling | Mix of exceptions and codes | err != nil return values | Result<T,E> + ? |
| Generics | Templates (powerful, terrible errors) | Since 1.18, restricted | Traits + generics, monomorphised |
| Compile speed | Slow (template instantiation) | Very fast | Slow (better than C++) |
| Package mgmt | No standard (CMake/vcpkg/Conan) | go mod built-in | cargo + crates.io built-in |
| Learning curve | Steep + long (30 yrs of legacy) | Very gentle | Steep at first; lifetimes settle in |
| Typical domains | Game engines / finance / compilers | Cloud backends / DevOps / CLI | Systems / browsers / tooling / WASM |
| 2026 hiring | Steady, slowly shrinking | Steady | Rising · median salary high |
Outlook : TheRoadAhead
Post-Edition 2024, Rust enters its "mature improvement" phase — async traits maturing, const generics expanding, more kernel and Windows surface area, and AI infrastructure continuing to be rewritten in it.
Edition 2024 + Rust 1.85
Released February 2025. The largest Edition delta yet: async closures stable, let chains (if let A = x && let B = y), revised lifetime capture rules, Future in the prelude. As always, edition upgrade is opt-in per crate — old code keeps working.
The mental model didn't change, but day-to-day code shed a dozen pieces of boilerplate. This is the most-requested batch of improvements the community has gotten.
Linux kernel expansion
Since the 6.1 initial infrastructure, kernel-side Rust subsystems have gradually grown — network drivers, filesystems, PCI bindings. Linus' position: "as long as it doesn't break the C side, Rust is welcome to take new subsystems."
Microsoft going all-in on Rust
Russinovich has reiterated it repeatedly: "new projects should use Rust." Windows kernel already ships DirectWriteCore and Win32k/GDI Region in Rust; the Hyper-V ARM64 emulator is going Rust too. The decade-scale goal: gradually migrate the dangerous portions of a billion lines of C/C++.
9 years most-admired on Stack Overflow
2016-2024, nine years running. The 2024 survey shows 83% of current Rust users want to continue using it — a wide gap over every other language. "Most admired" isn't the same as "most used," but "people who've tried it want to keep using it" is the most direct indicator of language UX.
AI infra continues going Rust
tokenizers / candle / vllm kernels / Polars / DataFusion — the AI data and inference stack is rapidly Rust-ifying underneath. Python remains the user-facing API, but the bottleneck hot paths are almost all under Rust now.
JS toolchain fully Rust-ified
Rolldown 1.0 RC (Jan 2026) takes over from Rollup; Vite 8 bundles it by default. Oxc / SWC / Rspack / Turbopack / Biome have collectively moved JS tooling from "seconds" to "milliseconds." Evan You founded VoidZero specifically for this rewrite wave.