Field Guide · language

Also known as: Rust

Rust is a statically typed, compiled systems language designed to be fast and safe: its borrow checker enforces memory safety at compile time, eliminating whole classes of bugs without a garbage collector or runtime cost.1

.rs source borrowchecker pass reject unsafe safe native binaryno GC
Rust's borrow checker proves memory safety at compile time, then emits a native binary with no garbage collector.

Overview

Rust compiles ahead of time to native machine code, with performance that rivals C and C++.2 Its defining idea is ownership: each value has a single owner, and a compile-time borrow checker enforces strict rules about how references may be shared and mutated. Code that violates those rules simply does not compile, which rules out use-after-free, double-free and data races — providing memory safety and safe concurrency without a garbage collector.

Strengths and trade-offs

The payoff is memory safety and speed at the same time, with no runtime collector and no GC pauses. The price is a steep learning curve — the borrow checker is famously hard to satisfy at first and forces you to think carefully about lifetimes and ownership. The ecosystem, while growing fast, is younger than C’s or C++’s, and compile times can be long. The trade is deliberate: more friction up front in exchange for fewer whole classes of bugs later.

Where it’s used

Rust is increasingly chosen for new systems software, command-line tools, WebAssembly targets, and safety-critical components — places that want C-level control without C’s memory hazards. It is not so much replacing C and C++ as competing with them for new work, with the three expected to coexist for a long time.

Sources

  1. Rust (programming language) — Wikipedia, for history and design background. 

  2. The Rust programming language — official site, documentation, and the ownership/borrow-checker model. 

See also