Glossary · Programming

Rust (Programming Language)

Rust is a compiled systems language that guarantees memory safety without a garbage collector by enforcing ownership and borrowing rules at compile time.

Updated October 6, 2026

Rust is a compiled systems programming language, first released as stable in 2015 after starting at Mozilla. It guarantees memory safety and prevents data races at compile time through an ownership and borrowing system, without needing a garbage collector.

Why it matters

Rust offers performance comparable to C and C++ while ruling out whole classes of bugs such as use-after-free and buffer overflows in safe code. That makes it attractive for operating system components, browsers, command-line tools, WebAssembly and network services. The cost is a steeper learning curve: the borrow checker rejects programs that other languages would accept, and compile times can be long.

Example

fn main() {
    let s = String::from("hello");
    let t = s;          // ownership moves to t
    println!("{}", t);  // ok
    // println!("{}", s); // compile error: s was moved
}

Each value has a single owner. After the move, s can no longer be used, so the compiler stops a double free before the program ever runs.

Common mistakes

  • Fighting the borrow checker by cloning everything instead of restructuring ownership.
  • Overusing unwrap(), which panics on an error or missing value.
  • Assuming unsafe blocks are checked; inside them the programmer is responsible.

Get notified when this term updates

Plus occasional practical tips on uptime and monitoring, nothing else. Unsubscribe anytime.

This page is general information written by our editorial team and updated when documentation changes. Servers and providers differ, so test changes safely first. See our editorial policy and disclaimer.