Outline updated November 2026

Foundation35 hours delivered over 5-10 daysLive, online or on-site

Request this course

Mastering Rust

Class Duration

35 hours of live training delivered over 5-10 days to accommodate your scheduling needs.

Student Prerequisites

  • Professional software development experience in any modern language
  • Comfort with the command line
  • No prior Rust experience required

Target Audience

Software engineers new to Rust who will write libraries and services that other people depend on, including async services, C integrations, and procedural macros. For a shorter start, Rust Essentials covers the first part of this course in 21 hours. Teams continuing on can move to Memory-Safe Programming with Rust and Rust Parallel Programming.

Description

Mastering Rust takes developers new to the language from their first program to advanced Rust in one course. The first part covers the Rust Essentials material: Cargo, types, ownership, lifetimes, pattern matching, and error handling. The course then moves through traits and generics, async, concurrency, unsafe, FFI, and macros. It ends with Cargo builds, editions, testing, and agentic development. Students use AI coding assistants on Rust code and check the results with the compiler, clippy, and tests.

Learning Outcomes

  • Build CLI applications and library crates with Cargo.
  • Write idiomatic Rust using ownership, borrowing, and lifetimes.
  • Model data with structs, enums, and pattern matching.
  • Handle errors with Result<T, E> and the ? operator.
  • Design APIs with traits, generics, and lifetimes.
  • Build async services on Tokio with structured cancellation.
  • Share data across threads with Arc, Mutex, channels, and atomics.
  • Write unsafe code behind safe abstractions.
  • Wrap C libraries in safe Rust APIs.
  • Write declarative macros and procedural derive macros.
  • Write tested and documented Rust libraries.
  • Review AI-generated Rust with the compiler, clippy, and tests.
  • Set up CI that catches regressions before merge.

Training Materials

All students receive comprehensive courseware covering all topics in the course. Courseware is distributed via GitHub in the form of documentation and extensive code samples.

Software Requirements

A free GitHub account, the current stable Rust toolchain via rustup (2024 edition), Visual Studio Code or another supported editor with the rust-analyzer extension, Docker for the FFI examples, and an AI coding assistant of choice (GitHub Copilot, Cursor, or Claude Code). A cloud-based environment can be provided if local installation is restricted.

Training Topics

Introduction to Modern Rust

  • What Rust is and where it fits
  • What the current edition changed
  • Working with the borrow checker
  • The crates.io ecosystem
  • The Rust Playground

Toolchain and Editor Setup

  • Installing Rust with rustup
  • Managing toolchains
  • cargo, rustc, rustfmt, and clippy
  • rust-analyzer in VS Code, RustRover, and Zed
  • Debugging with CodeLLDB
  • AI assistants for Rust
  • A daily Rust workflow

Hello, Cargo

  • Creating a project with cargo new
  • main and println!
  • cargo run and cargo build
  • Release builds
  • Managing dependencies in Cargo.toml
  • Workspaces and cargo publish --workspace

Scalar Types and Variables

  • Integers, floats, booleans, and characters
  • Constants and statics
  • Immutability and mut
  • Shadowing and scope
  • Overflow in debug vs. release

Control Flow

  • Expressions vs. statements
  • if and else
  • loop, break, and labeled loops
  • while and for loops
  • let chains in if and while
  • Block expressions

Functions and Closures

  • Defining and calling functions
  • Parameter and return types
  • Closures and capture modes
  • Function pointers vs. closures
  • Spotting hallucinated signatures from AI

Modules and Crates

  • mod and use
  • The standard library
  • Third-party crates from crates.io
  • Re-exports and visibility

Built-In Macros

  • print!, println!, eprintln!, and format!
  • vec!, dbg!, and assert!
  • include_str! and include_bytes!
  • cfg!, env!, and panic!

Memory Management and Ownership

  • Manual memory management vs. garbage collection
  • Ownership and moves
  • Copy vs. Clone
  • Borrowing with &T and &mut T
  • Lifetimes and the borrow checker
  • Lifetime elision and annotations
  • Reading borrow-checker errors
  • Common ownership patterns

Strings and String Slices

  • String vs. &str
  • UTF-8 and character boundaries
  • Parsing, trimming, splitting, and joining
  • String formatting

Tuples, Enums, and Structs

  • Tuples and tuple structs
  • Enums with data
  • Option<T> and Result<T, E>
  • Structs and methods
  • Associated functions and constructors
  • The newtype pattern

Collections and Iterators

  • Creating and indexing Vec<T>
  • Slicing and iteration
  • iter, iter_mut, and into_iter
  • HashMap and HashSet
  • BTreeMap and BTreeSet
  • Borrowing rules for collections
  • Iterator combinators
  • Custom iterators

Pattern Matching

  • match and exhaustiveness
  • if let and while let
  • Destructuring structs, tuples, and enums
  • Nested patterns
  • Guards, bindings, and @ patterns
  • Refutable vs. irrefutable patterns

Idiomatic Error Handling

  • Result<T, E> and the ? operator
  • Custom error enums with thiserror
  • Application errors with anyhow
  • Avoiding unwrap in library code
  • When to panic

AI-Assisted Rust Development

  • rust-analyzer and AI as a feedback loop
  • The compiler and clippy as the check
  • Prompts for ownership and lifetimes
  • Reviewing AI-generated unwrap
  • A CLI feature from prompt to review

Traits and Generics

  • Defining and implementing traits
  • Default methods and supertraits
  • Bounds, where clauses, and associated types
  • Trait objects and dyn Trait
  • Trait upcasting
  • Static vs. dynamic dispatch

Advanced Traits and Lifetimes

  • Return-position impl Trait in traits
  • RPIT lifetime capture rules
  • Precise capturing with use<..>
  • Higher-ranked trait bounds
  • Designing trait hierarchies

Async and Concurrency

  • The async/await model
  • Async fn in traits
  • Async closures and the AsyncFn traits
  • Tokio tasks and the scheduler
  • tokio::select! and JoinSet
  • Structured cancellation
  • Streams and futures::Stream

Concurrent Programming

  • Send, Sync, and data races
  • Threads, Arc, Mutex, and RwLock
  • Channels in std, crossbeam, and tokio
  • Atomics and memory ordering
  • rayon vs. async

Unsafe Rust

  • What unsafe allows
  • Raw pointers
  • Safe abstractions over unsafe code
  • Naked functions
  • Auditing unsafe blocks
  • Reviewing AI-generated unsafe

Foreign Function Interface

  • extern "C" and ABIs
  • unsafe extern blocks and unsafe attributes
  • Calling C from Rust
  • Exposing Rust to C
  • CString and CStr
  • bindgen, cbindgen, and libc
  • Safe wrappers over C libraries

Macros and Metaprogramming

  • Declarative macros with macro_rules!
  • Fragment specifiers, repetition, and hygiene
  • Derive, attribute, and function-like macros
  • syn, quote, and proc-macro2
  • Writing a custom derive macro

Cargo Features and Builds

  • Features and profiles in Cargo.toml
  • Target-specific dependencies
  • Build scripts and code generation
  • Reproducible builds
  • Dependency hygiene
  • LLD by default on x86-64 Linux

Editions and MSRV

  • Editions, MSRV, and toolchains
  • Temporary scope changes
  • Stable features on every edition
  • The MSRV-aware resolver
  • Migrating with cargo fix --edition

Testing, Documentation, and Quality

  • Unit, integration, and doc tests
  • Property testing with proptest
  • Benchmarks with criterion
  • Documentation with rustdoc
  • Coverage with cargo-llvm-cov

Agentic Rust Development

  • Copilot, Cursor, Claude Code, and Codex
  • Tests as gatekeepers for AI code
  • Prompts for trait design
  • Unbounded allocations in AI code
  • MCP tools in Rust workflows
  • Agent-driven refactors
  • AI code review in CI
  • Measuring AI's effect on a team

Private team training

Bring this course to your team

Tell us about your team and we will tailor this outline to your tools, stack, and schedule. Courses can also be combined into a longer program.

  1. Tell us what you needYour tools, stack, team size, and timeline.
  2. We send a proposalA course or program, an outline adjusted to your team, and possible dates.
  3. Your team trains liveOnline or on-site, with courseware for every student.

Prefer to talk? Call +1 434-509-6890 or email help@cloudcontraptions.com.

We reply within 1 business day.

Training partner?