Before Rust: controlling the machine without a safety net
A systems language is used to write software that runs close to the hardware or under tight constraints: kernels, drivers, browsers, databases, game engines. It is expected to deliver predictable performance, explicit memory management and easy calls into existing code.
C has met those needs since the 1970s. It exposes addresses, lets programmers allocate and free memory themselves and carries no heavy runtime. In return, it hands them a long list of obligations: stay within array bounds, never touch freed memory, never free anything twice, synchronise shared access. Breaking one of them often leads to undefined behaviour: the standard no longer says what the program does.
C++ adds powerful abstractions. RAII ties a resource to an object’s lifetime; smart pointers and move semantics express who owns what. These tools greatly improve resource management, but using them correctly remains a convention: a raw pointer, or a reference to an element of a vector, can still outlive the data it points to.
Other languages chose safety through a garbage collector: Java, C# and Go reclaim unreachable memory automatically. That suits a great deal of software. It does, however, bring a runtime, along with pauses or memory overhead that some fields prefer to manage themselves.
Figures published later by Google show the scale of the problem: in 2019, memory safety bugs accounted for 76% of Android vulnerabilities. Rust’s question fits in one sentence: can a systems language keep that level of control while having most of these rules checked before the program runs?
2006–2010: a side project, then a team at Mozilla
In 2006, Graydon Hoare was 29 and working at Mozilla. As he later told MIT Technology Review, he came home one day to find the lift in his Vancouver apartment building out of order because its software had crashed. The anecdote captures a wider frustration: everyday programs failing because of memory errors that better tools could prevent. He began a new language in his spare time. The name refers to rust fungi, which he describes as “over-engineered for survival”.
In July 2010, Hoare presented the project at the Mozilla Annual Summit. His slides describe a “compiled, concurrent, safe” systems programming language that he had been working on for four and a half years. They add that a small group at Mozilla had become interested “this past year” — that is, in 2009, when the company began officially sponsoring the project and assigning engineers to it.
The talk’s title sums up the intent: Technology from the past come to save the future from itself. Hoare claimed very little novelty. He listed Mesa and CLU among older languages that were often better than their successors, and said he was borrowing from Erlang, Newsqueak, Limbo and Hermes. The aim was to combine these proven ideas in a language fit for large systems. He also criticised C++ as memory-unsafe, with no ownership policy and no control over concurrency.
The 2010 implementation was modest: a bootstrap compiler of about 38,000 lines of OCaml, an x86 code generator and a move to LLVM under way. In a 2012 interview with InfoQ, Hoare dates the self-hosted compiler, written in Rust itself, to 2011. By then other contributors had joined; Hoare described himself as “only one member of the team now”. He stepped away from the project in 2013.
Mozilla also had a concrete need: Servo, an experimental browser engine designed to exploit parallelism without multiplying memory bugs. Rust and Servo grew up together, with the browser serving as the language’s proving ground.
From the intentions of 2010 to the language of 2015
The Rust presented in 2010 is not the one people learn today. The goals were already there: memory safety, concurrency, predictable performance, immutability by default and a controlled way to bend the rules. The means changed a great deal.
The 2010 slides describe something close to an actor language: isolated lightweight tasks that share no mutable data and communicate by passing messages. A typestate mechanism was meant to track the state of values, for instance to rule out null pointers. A per-task garbage collector handled some data.
The release notes let us follow the transformation:
- Rust 0.1, released on 20 January 2012, offered unique pointers, move semantics, multithreaded task scheduling and typestate predicates. Its notes warned that code written at the time would break without notice.
- Rust 0.4, in October 2012, removed typestate and made borrowed pointers more mature.
- In November 2012, Niko Matsakis proposed that a mutable reference,
&mut, should be the only way to reach the data it points to. Still presented as an idea to explore, this rule became the heart of today’s model.
- Rust 0.9, in January 2014, put managed
@ pointers behind a feature gate.
- Rust 1.0.0-alpha, in January 2015, announced that Rust no longer had a runtime of its own and used operating system threads instead of lightweight tasks.
The language therefore dropped several of its original mechanisms and concentrated its guarantees in the type system: ownership, borrowing and lifetimes. Rust 1.0 was the product of these successive collective trade-offs rather than the execution of an initial plan.
Ownership and borrowing: the rule that defines the language
Rust’s model rests on ownership. It answers a simple question: which part of the program is responsible for a value and for freeing it?
One owner per value
The official book, The Rust Programming Language, states three rules:
- each value in Rust has an owner;
- there can only be one owner at a time;
- when the owner goes out of scope, the value is dropped.
A String holds a pointer to characters stored on the heap. Writing let archive = message; does not copy those characters: ownership is moved to archive. From then on, the compiler treats message as unusable. Only one variable will free the memory, so a double free cannot happen in this code. Simple types such as integers are copied instead.
Borrowing without taking
Moving every value just to read it would be impractical. Rust therefore lets you borrow it through a reference:
&message creates a shared reference: it can read the value, and several can exist at once;
&mut message creates a mutable reference: it can change the value, but it must be the only one in use.
The rule boils down to this: at any given time, many readers or a single writer. The owner keeps the value; a borrow ends after its last use.
fn count_bytes(text: &str) -> usize {
text.len()
}
fn add_exclamation(text: &mut String) {
text.push('!');
}
fn main() {
let mut message = String::from("Hello");
let size = count_bytes(&message); // shared borrow: reading
add_exclamation(&mut message); // exclusive borrow: changing
println!("{message} ({size} bytes before the push)");
let archive = message; // move: archive becomes the owner
println!("{archive}");
} // archive goes out of scope: the string is freed exactly once
The program prints Hello! (5 bytes before the push), then Hello!. The len method counts bytes, not characters: “Hello” has five because each of its letters takes one byte in UTF-8. Adding println!("{message}"); after the move would trigger error E0382: the value has been moved and can no longer be borrowed under its old name.

Lifetimes: what the compiler checks
A reference must never outlive the value it points to. A reference’s lifetime is the stretch of the program during which it stays valid. Most of the time the compiler infers it. When a function takes several references and returns one, it may ask for an annotation such as 'a, which describes how their lifetimes relate without extending them.
The part of the compiler that performs these checks is the borrow checker. Inside a function, it rejects this snippet:
let mut numbers = vec![1, 2, 3];
let first = &numbers[0];
numbers.push(4); // rejected: numbers is still borrowed
println!("{first}");
Error E0502 can look fussy. It guards against a real bug, though: adding an element may force the vector to move its contents to a larger block of memory. first would then point to freed memory. In C++, the same scenario with a reference to an element of a std::vector compiles; if the push triggers a reallocation, using the reference afterwards is undefined behaviour. In Rust, reading first before the push, or copying the value, is enough for the program to be accepted.
These rules have been relaxed over time. Introduced with the 2018 edition and later extended to the 2015 edition, non-lexical lifetimes end a borrow at its last use rather than at the end of the block. The compiler now accepts more correct programs without weakening the guarantee.
A type system in the service of guarantees
Rust is statically typed: the type of every value is known at compile time. Type inference saves you from writing them everywhere. let size = count_bytes(&message); is enough: the compiler knows that size is a usize.
The official language reference lists its influences. Algebraic data types, pattern matching and type inference come from the ML family, whose foundations were laid by Robin Milner. References, RAII, smart pointers and move semantics come from C++. Region-based memory management draws on work such as Cyclone, a safe dialect of C.
Traits and generics
A trait describes behaviour that several types can provide, such as “can be displayed” or “can be compared”. Traits are inspired by Haskell’s type classes. Generics let you write a function for any type that implements a given trait.
The compiler usually generates a specialised copy of the code for each type used, a process called monomorphisation. The abstraction then costs no indirect call at run time. This idea of zero-cost abstraction echoes C++’s ambition; it also extends the tradition of abstract data types championed by Barbara Liskov with CLU, one of the older languages Hoare said deserved rediscovering.
Option and Result: making absence and failure visible
In safe Rust, a reference is never null. A value that may be missing has the type Option<T>, which is either Some(value) or None. An operation that can fail returns Result<T, E>, which is either Ok(value) or Err(error). The program has to handle both cases before using the result.
fn main() {
match "42".parse::<u8>() {
Ok(age) => println!("Age read: {age}"),
Err(error) => println!("Invalid input: {error}"),
}
}
This program prints Age read: 42. Option expresses a normal absence, such as the first element of an empty list. Result carries an explanation of the failure, such as text that is not a number. The ? operator passes an error up to the calling function in a single line. Unrecoverable failures go through a panic, which stops the thread concerned, or the whole program depending on its configuration; panics are meant for bugs, not for ordinary control flow.
Concurrency: what Rust prevents, and what it leaves to the programmer
The project’s documentation speaks of “fearless concurrency”. The phrase needs to be read carefully. A data race occurs when several threads access the same memory at the same time, at least one of them writes, and nothing synchronises them. It is undefined behaviour.
Safe Rust rules out data races in two ways. The “many readers or one writer” rule also applies across threads. The Send and Sync traits then state which types may be transferred or shared between threads. Rc, a non-atomic reference counter, is not Send: the compiler refuses to hand it to another thread. To share a mutable value, you might place it in a Mutex, itself shared through an Arc.
The Rustonomicon, the documentation devoted to low-level code, is explicit about what remains out of reach: Rust does not prevent general race conditions. Two threads can run in an unexpected order and produce a wrong result without corrupting memory. A program can also hang in a deadlock, when two threads each wait for a lock held by the other. Memory leaks are possible in safe code too, for instance through a cycle of Rc references. These defects still call for careful design, testing and review.
The guarantee is therefore targeted: memory safety and freedom from data races in safe Rust. It covers a class of errors that is especially hard to diagnose, not the full correctness of a concurrent program. Since Rust 1.39 in November 2019, async/await syntax has extended these rules to asynchronous programs, widely used in network services.
The unsafe keyword: a declared boundary
Some operations cannot be checked by the compiler: calling a C function, manipulating a hardware register, implementing a low-level data structure. Rust allows them inside a block or function marked unsafe.
The keyword unlocks five abilities, including dereferencing a raw pointer and calling a function that is itself unsafe. It does not switch off the borrow checker or Rust’s other checks. It means: here, the programmer vouches for properties the compiler cannot prove.
The idea was already in the 2010 talk: being able to break the static rules, but only by stating where and how, in a standard way that is easy to audit. Recommended practice is to wrap unsafe code in a small safe abstraction. The standard library does exactly that: Vec, String and Mutex rely on carefully reviewed unsafe code but expose a safe interface.
A mistake inside an unsafe block can nonetheless compromise the entire program. Rust’s safety therefore also depends on the quality of those foundations, of the libraries in use and of any C code being called.
Rust 1.0, release trains and editions
Until 2014, Rust’s syntax and library changed frequently. In October 2014, the team announced a release model borrowed from web browsers: a nightly build every night, a beta, then a stable release every six weeks. Experimental features stay on nightly.
Rust 1.0 was released on 15 May 2015. The announcement presented it as the end of a period of churn: code that compiles on stable Rust should keep compiling with later releases, apart from limited exceptions such as compiler bug fixes. The project’s motto became “stability without stagnation”.
To introduce incompatible changes despite that commitment, Rust created editions. Each package chooses its edition in its configuration file. Packages on different editions work together, because all editions are lowered to the same internal representation in the compiler. The cargo fix tool automates most migrations.
| Edition |
Stable release |
Date |
Example changes |
| 2015 |
Rust 1.0 |
15 May 2015 |
The stabilised base language |
| 2018 |
Rust 1.31 |
6 December 2018 |
async and await reserved as keywords, new module path system |
| 2021 |
Rust 1.56 |
21 October 2021 |
Finer-grained variable capture in closures, by-value iteration over arrays |
| 2024 |
Rust 1.85 |
20 February 2025 |
extern blocks explicitly marked unsafe, gen reserved as a keyword |
An edition is not a compiler version. Rust 1.85 still compiles code written for the 2015, 2018 and 2021 editions. New compatible features arrive in ordinary releases, every six weeks.

Even before 1.0, Rust gained a central tool: Cargo, designed by Yehuda Katz and Carl Lerche. It creates projects, downloads dependencies, compiles, runs tests, generates documentation and handles cross-compilation. The public crates.io registry opened on 20 November 2014. A Rust library is called a crate.
That integration changed the developer experience. In C and C++, each project often combines its own build system, dependency manager and conventions. In Rust, cargo build, cargo test and cargo doc behave the same way from one project to the next.
Other official tools complete the set:
- rustc, the compiler, known for detailed error messages that often explain the rule being broken and suggest a fix;
- rustfmt, which applies a shared formatting style;
- Clippy, which flags hundreds of common mistakes and unidiomatic patterns; rustfmt and Clippy both reached version 1.0 with Rust 2018;
- rustdoc, which builds documentation from comments and runs the code examples it contains as tests.
Documentation played a comparable role. The Rust Programming Language, often simply called “the Book”, is free and maintained by the project. It is complemented by Rust by Example, the language reference and the Rustonomicon for unsafe code. A demanding language becomes more approachable when its hardest ideas are explained by official, up-to-date sources.
From Mozilla to the Rust Foundation: open governance
Rust was developed in public from 2010. From 2014 onwards, significant changes went through RFCs: written proposals discussed openly before being accepted. Specialised teams share responsibility for the language, the compiler, the library, tooling and infrastructure. The Rust 1.0 announcement thanks around 215 contributors for that release cycle alone.
For a long time, Mozilla remained the team’s main employer. In August 2020, the company announced around 250 layoffs, which affected active members of the Rust project. The Core Team pointed out that team membership belongs to individuals, not employers, and announced plans for a foundation that would, among other things, take ownership of the trademarks and domain names for Rust, Cargo and crates.io.
The Rust Foundation was announced on 8 February 2021. Its founding members were AWS, Huawei, Google, Microsoft and Mozilla. Mozilla transferred its trademarks and infrastructure assets to it, including the crates.io registry. The foundation funds and administers; it does not decide on its own how the language evolves.
Technical decisions remain with the Rust project. On 20 June 2023, RFC 3392 created the Leadership Council, made up of one representative from each top-level team. It replaced the former Core Team and coordinates the project, while the specialised teams keep their own areas of decision.
Where Rust is used
Rust’s adoption is better measured by documented uses than by slogans. It also helps to separate experiments, work in progress and real deployments.
Browsers. Firefox 48, in 2016, shipped Mozilla’s first Rust component: an MP4 metadata parser. Firefox 57, branded Firefox Quantum, integrated the CSS style engine from Servo in late 2017; it can spread its work across several cores. Servo, which Mozilla presented as an experimental engine, did not replace Firefox’s Gecko engine. In 2019, a Mozilla analysis estimated that 51 of the 69 security bugs in the old style component would not have been possible in Rust; it also noted that a check had been overlooked during the rewrite, reintroducing a bug already fixed in C++.
The Linux kernel. Merged in October 2022 for version 6.1, released later that year, a first Rust infrastructure made it possible to build a module and a sample, with no useful driver at that stage. Drivers and abstractions followed in later releases. In December 2025, the Maintainers Summit concluded that Rust was no longer experimental in the kernel. The patch recording that decision notes that some compiler combinations remain experimental and that much work lies ahead; it also points out that Rust already runs on millions of devices through Android. The history of the Linux kernel obviously goes far beyond this one change.
Mobile operating systems. Since 2019, Android has favoured memory-safe languages for new code. Google reports that the share of memory safety vulnerabilities fell from 76% in 2019 to 24% in 2024. Google attributes the drop to the shift of new code towards these languages, Rust among them, not to Rust alone.
Network services and infrastructure. In 2022, Cloudflare introduced Pingora, a proxy written in Rust that replaced its NGINX-based service and handles more than a trillion requests a day. At AWS, Firecracker, a lightweight virtual machine monitor written in Rust, underpins AWS Lambda.
Command-line tools. Rust produces fast, self-contained executables that are easy to distribute. ripgrep, a file search tool, is a good example of this very active category.
WebAssembly. The compiler can target wasm32-unknown-unknown, a WebAssembly target with no operating system. Rust code can therefore run in a browser alongside JavaScript, for heavy computation or for libraries shared between client and server.
Limits and costs
The learning curve is real. Ownership, borrowing, lifetimes and traits demand new habits, especially from developers used to garbage-collected languages. In the 2024 State of Rust survey, about 31% of people who do not use Rust named its perceived difficulty as the main reason.
Complexity grows with advanced features: nested generics, asynchronous programming, macros. The same survey lists the fear that the language will become too complex among its users’ main worries.
Compile times weigh too: in that survey, slow compilation tops the list of factors that limit users’ productivity. Monomorphisation, checking and optimisation all have a cost, particularly on large projects.
Working with existing code requires care. Calling a C library goes through an unsafe interface; its guarantees hold only if both sides follow the same memory and threading conventions. Rewriting a component can also bring back old bugs, as the Firefox experience showed.
unsafe remains essential at the lowest level. Well contained, it concentrates human review on a few areas. Poorly handled, it reintroduces the very risks Rust sets out to avoid.
Finally, Rust offers no protection against logic errors, faulty authorisation, injection flaws or compromised dependencies. Memory safety is an important property; software security requires many others.
Rust’s legacy
Rust showed that a systems language could shift part of memory checking from run time to compile time, without a garbage collector. It did not invent every idea: it combined concepts from C++, ML, Cyclone and concurrent languages, and made them usable at scale through a demanding compiler and shared tools.
That demonstration has shaped discussions about memory safety well beyond its own community. Vendors of operating systems, browsers and online services are introducing Rust into exposed components. Its tooling — an integrated package manager, standard formatting, instructive error messages — has also become a reference point for other languages.
Rust nonetheless coexists with C and C++. Existing codebases represent decades of engineering, and a complete rewrite is neither always possible nor always desirable. The most common choice is to write new high-risk components in Rust alongside older code that continues to be maintained. Rust’s lasting contribution is to have made that trade-off explicit: you can have performance and control while requiring the compiler to check part of what used to be left to discipline alone.
Frequently asked questions
Is Rust 100% safe?
No. Safe Rust guarantees memory safety and freedom from data races, provided the unsafe code it relies on is correct. It does not prevent logic errors, deadlocks, memory leaks or design flaws. The guarantee covers a specific class of errors.
Does Rust use a garbage collector?
No. Memory is freed when its owner goes out of scope, at a point known at compile time. Early versions of the language had garbage-collected managed pointers; they were removed before Rust 1.0. Types such as Rc and Arc count references when several owners are needed.
Who created Rust?
Graydon Hoare started the project in 2006. Mozilla backed it from 2009, and the language stabilised in 2015 is the work of many engineers and contributors. Hoare stepped down from leading the project in 2013, before Rust 1.0.
Do you need to learn C before Rust?
It isn’t necessary. Knowing C helps you understand what Rust checks: the stack, the heap, pointers, freeing memory. But the official book is written for people who already program in another language, not necessarily C.
Will Rust replace C and C++?
That is not the trend so far. Rust is being adopted for new components, especially where memory bugs are costly. C and C++ keep enormous codebases, compilers for many platforms and very rich ecosystems. Projects often combine several languages.
Why does the Rust compiler reject code that looks correct?
The borrow checker only accepts programs whose safety it can demonstrate with its rules. Some correct programs fall outside that demonstration. You then need to restructure the code, copy a value, use a suitable type such as RefCell or Mutex, or, as a last resort, write a justified unsafe abstraction.