Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Why Rust?

  • Technical features
  • Corporate Support / Acceptance
  • Community Support / Acceptance
Rust logo

Technical features


  • Performance
  • Reliability
  • Productivity

Performance

Reliability

  • Memory safe - it avoids most of the memory-related bugs we encounter in C/C++ code.
  • Extensive and expressive type-system. (e.g. mapping of external APIs).
  • Very strict compiler - fixing bugs during compilation.
  • No "null" or "none" values.
  • Compiler has very good error messages.
  • Integrated package manager, build system, etc. Cargo.
  • Code formatter rustfmt.
  • Clippy, the linter
  • IDE support by rust-analyzer.

Productivity

  • Productivity - on par with Go, 2x as C++ at Google
  • Spend less time writing tests.
  • Spend less time debugging.
  • Safer to use AI generated code (because the compiler will catch a lot of issues).
  • Easy to write and distribute(!) cross-platform code for Windows, Linux, macOS. Especially small command-line tools.
  • Fearless concurrency.

Corporate Support / Acceptance

  • Rust Foundation Amazon, Google, Huawei, Facebook, Microsoft.

  • Many other corporations support and use Rust.

  • Adoption in Critical Projects: Amazon's Firecracker and Dropbox's use of Rust for performance-critical tasks.

Podcasts

Community Support / Acceptance

Crates (Libraries)

  • Rayon a data-parallelism library. (threads)
  • Tokio to build reliable network applications. (async)
  • Web frameworks
  • Tauri - Cross-Platform desktop applications with web technologies.
  • Bevy - A game engine.
  • Ratatui - A Rust crate for cooking up Terminal User Interfaces.

Command line tools

  • mdbook - to create books like this.

Drawbacks

  • The ecosystem is less mature than for other languages.
  • Not enough developers.
  • Some aspects of the language still lag behind other languages (eg. Async in Go is easier).
  • For embedded systems - not all hardware are supported. Yet. Platform support
  • Compile time.

Python Projects in Rust

  • ruff - a linter for Python.
  • uv - a Python package installer (replacement for pip, poetry, pdm).
  • polars - DataFrames (replacement for pandas).
  • Pydentic, the data validation library for Python.

uv

uv, an extremely fast Python package and project manager, written in Rust.

Ruff

ruff, an extremely fast Python linter and code formatter, written in Rust.

JavaScript Projects in Rust

Thank you Ferris

Rust logo