Rust Tutorials

Learn Rust systematically with guided tutorials covering syntax, types, control flow, ownership, borrowing, lifetimes, traits, error handling, and concurrency. Practice each concept with runnable examples in an interactive Rust playground designed for safe systems programming.

Count Data with HashMap

Count Data with HashMap

Create, query, update, extend, and iterate over a Rust HashMap through a deterministic word-count report.
Rust
Keep a Rust Project Clean

Keep a Rust Project Clean

Use rustfmt, Clippy, tests, and rustdoc as a deliberate quality loop while repairing a small prepared Rust library.
Rust
Add and Use a Crate Dependency

Add and Use a Crate Dependency

Add clap to a small Rust command, use its derive API, and understand how Cargo.toml, Cargo.lock, features, and locked builds work together.
Rust
Build a Task Tracker CLI

Build a Task Tracker CLI

Complete a scaffolded multi-command Rust task tracker with clap, modules, file persistence, error propagation, tests, and a release build.
Rust
Share Behavior with Traits

Share Behavior with Traits

Define a small Rust trait, implement it for two prepared types, and report both through one bounded generic function.
Rust
Reuse Data Structures with Generics

Reuse Data Structures with Generics

Turn one concrete Rust pair and one concrete helper into reusable generic code for both numbers and text.
Rust
Organize Code with Modules and Crates

Organize Code with Modules and Crates

Split a small Rust package across library, binary, and module files while learning crate boundaries, paths, use declarations, and basic visibility.
Rust
Prove Behavior with Rust Tests

Prove Behavior with Rust Tests

Add focused unit and integration tests to a small Rust library, cover boundary cases, and run exactly the tests you need with Cargo.
Rust
Accept Command-Line Arguments

Accept Command-Line Arguments

Build a small Rust search command that parses arguments, calls prepared library logic, and reports success and failure through the correct process channels.
Rust
Read and Write Files

Read and Write Files

Read a prepared log through Path and std::fs, summarize its lines, write a report, and propagate file errors with Result.
Rust
Handle Recoverable Errors with Result

Handle Recoverable Errors with Result

Parse and validate prepared values by matching Result, preserving error context, and propagating failures with the question mark operator.
Rust
Transform Data with Iterators and Closures

Transform Data with Iterators and Closures

Refactor a prepared sensor-reading program with borrowed iterators, closures, filter, map, collect, and sum.
Rust
Your First Cargo Project

Your First Cargo Project

Learn the terminal, nano, and the basic Cargo workflow while completing and running a small Rust program.
Rust
Build Lists with Vec

Build Lists with Vec

Create, update, safely access, and iterate over Rust vectors with shared and mutable references.
Rust
Handle Missing Values with Option

Handle Missing Values with Option

Use Rust Option values, exhaustive matching, and if let to distinguish present, empty, and missing inventory records safely.
Rust
Express Alternatives with Enums and Match

Express Alternatives with Enums and Match

Define data-carrying enum variants, destructure their data, and extend an exhaustive match with compiler guidance.
Rust
Model Records with Structs and Methods

Model Records with Structs and Methods

Build an InventoryItem record with fields, a constructor, a read-only value method, and a mutable restock method.
Rust
Work with Strings and Slices

Work with Strings and Slices

Relate owned String values to borrowed &str views, create safe substrings, and understand UTF-8 boundaries.
Rust
  • Prev
  • 1
  • 2
  • Next