Core
Fundamentals

terminal Rust Propaganda Programming

A language empowering everyone to build reliable and efficient software. Rust combines low-level control with high-level safety, forging a new standard for modern engineering.

bash — git log --reverse
commit 8858a74e50d1a93b482...
Author: Graydon Hoare <graydon@mozilla.com>
Date: Sun Jul 16 23:55:12 2006 -0700

initial commit of rustboot
~ drafting safety by construction
~ deleting null pointers

History of Rust

Rust began as a personal project by Graydon Hoare at Mozilla Research in 2006. Hoare’s vision was a language that prioritized memory safety and performance without the baggage of older systems languages.

2006 Initial Development
2015 Version 1.0 Release

The "1.0" milestone in May 2015 marked the commitment to stability and backward compatibility, solidifying its place as a formidable alternative to C++.

fingerprint

The Founder

Graydon Hoare, the original author of Rust, envisioned a world where systems programming wasn't a minefield of segmentation faults. His philosophy centered on "safety by construction."

Graydon Hoare

Graydon Hoare

Architect & Visionary

Core Principles

security

Memory Safety

No garbage collector required. Rust's ownership system guarantees memory safety and data-race freedom at compile time, eliminating a whole class of bugs before they occur.

bolt

Fearless Concurrency

Rust's ownership and type systems provide the tools to write concurrent code that is safe and efficient, making parallel programming accessible even to beginners.

layers

Zero-Cost Abstractions

The abstractions Rust provides have no run-time overhead. High-level patterns compile down to the same efficient machine code as hand-written low-level code.

The Community

The Rust community, affectionately known as "Rustaceans", is one of the language's greatest strengths. Known for being radically welcoming, helpful, and technically rigorous.

foundation

Rust Foundation

Driving long-term sustainability

event

RustConf

Annual gathering of enthusiasts

Cargo: The Rust Build Tool

What Cargo Actually Does

If you were to use the Rust compiler (rustc) alone, you would have to manually track every library your code uses and tell the compiler exactly where to find them. Cargo automates all of that.

download Fetches dependencies from crates.io
architecture Compiles code and dependencies
fact_check Runs tests and benchmarks
description Generates documentation
bash — cargo-project

Project Structure

Cargo generates a specific folder structure. Following these conventions is important because Cargo "expects" files to be in certain places.

my_project/
├── Cargo.toml      # The "Manifest": You edit this.
├── Cargo.lock      # The "State": Cargo edits this.
├── src/            # Your source code goes here.
│   └── main.rs     # Entry point for a binary.
│   └── lib.rs      # Entry point for a library.
├── tests/          # (Optional) Integration tests.
├── examples/       # (Optional) Example code.
└── target/         # (Generated) Build artifacts.
edit_note

Cargo.toml

The manifest where you write metadata. Define your project name, version, and dependencies using Semantic Versioning (e.g., serde = "1.0").

lock

Cargo.lock

Records exact versions used in the last successful build. Ensures reproducibility across different environments. You generally never touch this.

Essential Commands

You will spend 90% of your time using these core commands.

Command What it does
cargo new <name> Creates a new project folder with the standard layout.
cargo check Quickly checks if code compiles without building a binary. Use often.
cargo build Compiles your project. Use --release for production.
cargo run Compiles and immediately executes your code.
cargo test Runs all functions marked with #[test].
cargo add <crate> Adds a new dependency to your Cargo.toml automatically.

Crates vs. Packages

A Crate is the smallest unit of code (library or executable). A Package is a collection of one or more crates that provide functionality.

The target/ Folder

Contains build results. Can get massive. Use cargo clean to wipe it if low on disk space.

Crates.io

The central registry for sharing Rust code. Find web servers, parsers, or math libraries and add them to your manifest.

Trusted in Production

Microsoft Logo

Microsoft

Rewriting the Windows kernel to eliminate memory-related Blue Screens of Death.

Discord Logo

Discord

Rewrote core read-state services from Go to Rust to eliminate latency spikes for gamers.

Linux Logo

Linux

The first and only programming language outside of C to be officially adopted into the Linux kernel.

Figma Logo

Figma

Powers their heavy, high-performance multiplayer design engine directly in the browser via WebAssembly.

AWS Logo

Amazon Web Services

Heavily invests in Rust for critical cloud infrastructure like Firecracker and S3 to reduce energy consumption.

Microsoft Logo

Microsoft

Rewriting the Windows kernel to eliminate memory-related Blue Screens of Death.

Discord Logo

Discord

Rewrote core read-state services from Go to Rust to eliminate latency spikes for gamers.

Linux Logo

Linux

The first and only programming language outside of C to be officially adopted into the Linux kernel.

Figma Logo

Figma

Powers their heavy, high-performance multiplayer design engine directly in the browser via WebAssembly.

AWS Logo

Amazon Web Services

Heavily invests in Rust for critical cloud infrastructure like Firecracker and S3 to reduce energy consumption.