Rust
Memory safety without a garbage collector, paid for at compile time.
- First released
- 2015 (1.0)
- Created by
- Graydon Hoare, later sponsored by Mozilla
- Typing
- Static, strong, with inference and affine ownership
- File extensions
- .rs
What it is for
Rust took on the work that used to have no safe option. Operating systems, browsers, game engines, embedded firmware, databases: anywhere a garbage collector's pauses or overhead are unacceptable. The claim is that you can have C's control over memory and layout without C's talent for use-after-free, double frees and data races.
Ownership is the mechanism. Every value has exactly one owner, borrowing is checked statically, and the compiler refuses anything it cannot prove sound. A whole category of bug moves from three in the morning to the build step. That is why Rust keeps turning up in security-sensitive places, and why parts of Windows, Android and the Linux kernel now accept it. The same rules make the borrow checker a wall for newcomers. The learning curve is real and it is all at the front.
Outside systems work it has quietly become a fine choice for command-line tools and for the fast core of other languages' libraries. A good deal of modern Python tooling is Rust underneath. Cargo, the build tool and package manager, is an underrated part of why people stay.
Where it came from
Graydon Hoare started Rust as a personal project around 2006. Mozilla began sponsoring it in 2009, with an eye on a browser engine that could be parallel without being a security disaster. That work became Servo, and parts of it shipped in Firefox as Quantum.
The pre-1.0 years changed the language constantly. A garbage collector and green threads were both added and then taken out again, and the sigil-heavy early syntax was cut back hard. Rust 1.0 landed in May 2015 with the stability guarantee that has held ever since. Editions, in 2015, 2018, 2021 and 2024, let the language make breaking changes one crate at a time without splitting the ecosystem.
Mozilla laid off much of the Rust team in 2020. The Rust Foundation formed in 2021, backed by AWS, Google, Huawei, Microsoft and Mozilla, to hold the project independently. Adoption has kept climbing, helped along by governments and large vendors finally taking memory safety seriously.
What it is like to type
Rust has the densest punctuation here. Lifetimes put apostrophes into type positions, generics stack angle brackets, and paths use :: instead of a dot, a double-tap your fingers have to learn cold. Add &, ?, ! and the turbofish and it is far and away the best practice for the symbol row.
181 steps across 12 tours, from the basics to complete programs.
The tours
- Language basicsRust before the hard parts. 39 steps.
- Ownership & borrowingThe tour where Rust stops being familiar. 15 steps.
- Iterators & closuresRust's iterators are lazy, zero-cost, and the idiomatic way to do almost anything to a collection. 14 steps.
- Error handlingRust has no exceptions, so error handling is in the type system and you cannot ignore it by accident. 15 steps.
- Traits & genericsTraits are how Rust does polymorphism, and generics are how it stays fast while doing it. 19 steps.
- Concurrency & asyncRust's claim about concurrency is stronger than its claim about memory: data races are a compile error, not a debugging session. 15 steps.
- Lifetimes & interior mutabilityThe annotations most people avoid until they cannot. 11 steps.
- Modules, tests & macrosWhat surrounds the code. 12 steps.
- Serde & JSONSerde is the reason serialization in Rust is a derive and not a chore. 11 steps.
- CLI tools & HTTP clientsRust makes very good command-line tools, and this is why people who do not write systems software end up learning it anyway. 12 steps.
- Web services with axumA small web service in Rust. 9 steps.
- Data parallelism with rayonRayon turns a sequential iterator chain into a parallel one by changing iter to par_iter, and the type system checks that this is actually safe. 9 steps.
Official documentation
- The Rust Programming Language (the Book)
- Standard library reference
- Rust by Example
- The Cargo book
- crates.io