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.

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
Reject Invalid Shifts Without Losing Captions

Reject Invalid Shifts Without Losing Captions

Implement a protected Rust subtitle export: validate every cue before creating output, reject existing paths, and recover without losing text or source files.
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
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
Build Lists with Vec

Build Lists with Vec

Create, update, safely access, and iterate over Rust vectors with shared and mutable references.
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
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
Borrow Data with References

Borrow Data with References

Learn to inspect and update owned Rust data with shared and mutable references while the caller keeps ownership.
Rust
Ownership, Scope, and Moves

Ownership, Scope, and Moves

Learn Rust ownership by comparing copied integers with moved String data, reading an intentional E0382 diagnostic, and returning ownership from a function.
Rust
Make Decisions and Repeat Work

Make Decisions and Repeat Work

Build a small shipping summary while learning comparisons, if expressions, for loops, inclusive ranges, and running totals in Rust.
Rust
Functions and Expressions

Functions and Expressions

Complete three small Rust functions to learn parameters, arguments, return types, expression returns, and reusable function calls.
Rust
  • Prev
  • 1
  • 2
  • Next