Rust

Rust is a systems programming language focused on memory safety without a garbage collector, achieved through a compile-time ownership model. It produces native binaries with C-like performance and zero-cost abstractions, while preventing entire classes of bugs (use-after-free, data races) at the type level.

Core ideas

  • Ownership and borrowing. Each value has one owner; references are tracked by the compiler to prevent aliasing bugs.
  • No garbage collector. Memory is reclaimed deterministically when values go out of scope (Drop trait).
  • Traits and generics. Zero-cost abstractions via monomorphisation; expressive type system.
  • Fearless concurrency. The type system prevents data races; libraries (Tokio, Rayon) provide high-level concurrency.
  • Cargo. First-class build tool, dependency manager, test runner, and documentation generator.

Where Rust is used

  • Systems and infra: Firefox internals, Linux kernel modules, parts of Cloudflare, AWS Firecracker
  • Web back-ends: Actix Web, Axum, Rocket, Loco
  • Data engines: TiKV, ScyllaDB rewrites, Pingora, Vector, Materialize, Datafusion
  • Tooling: ripgrep, fd, bat, deno, rustdoc, the new TypeScript compiler being written in Rust
🔗
Related Terms
Go, Microservices, gRPC.

Subscribe to Sahil's Playbook

Clear thinking on product, engineering, and building at scale. No noise. One email when there's something worth sharing.
[email protected]
Subscribe
Mastodon