Rust

A systems language guaranteeing memory safety without a garbage collector.

CurrentadvancedGuide only -- no course yet

Overview

Rust achieves C/C++-level performance while eliminating whole classes of memory bugs (use-after-free, data races) at compile time through its ownership and borrowing system, enforced by the compiler rather than a garbage collector at runtime.

What it is
A statically-typed, compiled systems language whose compiler enforces memory safety via ownership rules.
Why it's used
For performance-critical software that also needs strong memory-safety guarantees -- browser engines, CLI tools, and increasingly parts of operating systems.
Where it fits
After some experience with a statically-typed language (C/C++ helps, but isn't required) -- the ownership model is Rust's steepest learning curve.

Core concepts

  • Ownership and borrowing
  • Lifetimes
  • The Result/Option types (no null, no exceptions)
  • Traits

Example

&str is a borrowed reference, not an owned value -- Rust's compiler tracks who owns which data and for how long, catching memory bugs before the program ever runs.

fn greet(name: &str) -> String {
    format!("Hello, {}!", name)
}

fn main() {
    println!("{}", greet("world"));
}

Common use cases

  • Systems programming with safety guarantees
  • CLI tools
  • WebAssembly modules
  • Performance-critical services

Project ideas

  • A small CLI tool that reads and processes a text file

Official references