Please note that this list of topics is based on our standard course offering, evolved from current industry uses and trends. We'll work with you to tune this course and level of coverage to target the skills you need most. Topics, agenda and labs are subject to change, and may adjust during live delivery based on audience skill level, interests and participation.
Getting Started with Rust
- What is Rust?
- Philosophy and Goals
- History and Motivation
- Differences between Rust and Python
- Rust Community and Ecosystem
- Exploring the Rust Playground
Install Rust (Optional)
- Installation Script
- Using macOS Homebrew
- Platform-Specific Installers
Rust Editors
- Setting up VSCode with Rust Extensions
- Using Rust Rover IDE
- Debugging Rust Code in VSCode
- Integrating GitHub Copilot for Rust
Hello World
- Creating a New Rust Project
- Writing the Main Function
- Printing to the Console
- Adding Comments to Code
Cargo
- Understanding What Cargo Is
- Comparing Cargo to Pip and Conda
- Rust Crates vs Python Packages
- Using Run, Build, and Release Commands
- Installing and Managing Third-Party Crates
Popular Cargo Crates
- Overview of Serde for Serialization
- Introduction to Tokio for Asynchronous Programming
- Using Reqwest for HTTP Requests
- Working with SQLx for Database Interactions
- Error Handling with Anyhow
Rust and Python Differences
- Static Typing in Rust vs Dynamic Typing in Python
- Memory Management Techniques
- Error Handling Approaches
- Control Flow: Sequence, Selection, and Iteration
- Structs vs Classes, and Traits vs Protocols
Scalar Types and Data
- Comparing Rust Types with Python Types
- Defining Constants in Rust
- Using Immutable Variables
- Utilizing Mutable Variables
Code Logic
- Writing If Statements
- Using Loops with Break
- Implementing While Loops
Functions
- Defining and Calling Functions
- Specifying Parameter and Return Types
- Creating and Using Closure Functions
Modules
- Importing Modules from the Standard Library
- Importing Modules from Third-Party Crates
- Defining Custom Modules
- Importing and Using Custom Modules
Built-In Macros
- Using print!, println!, and format! Macros
- Working with vec!, include_str!, and include_bytes!
- Employing cfg!, env!, and panic! Macros
Memory Management
- Understanding Ownership & Borrowing Concepts
- Working with References
- Differentiating Immutable vs Mutable References
- Managing Lifetimes in Rust
- Heap Allocation with Box and Rc
Strings
- Using String Slices and String Objects
- Converting Between Slices and Strings
- Parsing Numbers from Strings
- Trimming Strings and Printing with Interpolation
Tuples
- Understanding What a Tuple Is
- Using Heterogeneous Elements
- Accessing and Destructuring Tuple Elements
- Immutability of Tuples
Enums
- Defining and Using Enums
- Exploring Enum Variants and Methods
- Pattern Matching with Enums
- Working with Result and Option Enums
Structs
- Creating and Using Struct Instances
- Using Field Initialization Shorthand
- Implementing Methods and Associated Functions
- Employing the Constructor Pattern
Vectors
- Creating and Managing Vectors
- Adding and Removing Elements
- Accessing and Iterating Over Elements
- Slicing, Checking Length, and Capacity
Collections and Iterators
- Using Vectors, Arrays, and Slices
- Working with HashMaps and Hash Sets
- Implementing Iteration with Iterators
Traits
- Defining and Implementing Traits
- Using Default Trait Implementations
- Passing Traits as Parameters and Return Types
Generics
- Defining and Implementing Generics in Rust
- Using Generic Bounds and Multiple Types
- Writing Where Clauses for Generics
Pattern Matching
- Understanding Pattern Matching Concepts
- Using Match, If Let, and While Let Statements
- Destructuring Structs and Tuples
- Pattern Matching with Enums and Functions
Concurrent Programming
- Introduction to Concurrent Programming Concepts
- Using Multiple Threads in Rust
- Working with Mutex, RwLock, and Arc
- Message Passing with Channels
- Futures and Async/Await for Concurrency
Unsafe Rust
- Understanding the Need for Unsafe Rust
- Working with Raw Pointers and Dereferencing
- Calling Unsafe Functions and Creating Safe Abstractions
- Using Unsafe Traits and Blocks
Macros and Metaprogramming
- Defining and Using Macros with macro_rules!
- Pattern Matching in Macros
- Defining and Expanding Custom Macros
- Tests
- Writing and Organizing Test Functions
- Using Test Attributes and Coverage Tools
- Assertions with assert!, assert_eq!, and assert_ne!
Documentation with Rustdoc
- Generating Documentation with Rustdoc
- Adding Triple-Slash Comments and #[doc] Attributes
- Linking and Cross-Referencing Documentation
Python Extension written in Rust (overview)
- Creating and Running Python Extensions in Rust
- Compiling and Debugging Rust Extensions
- Running Parallel Code Outside of the GIL
- Managing GIL and Rust Lifetimes
- Creating Python Classes in Rust
Wrapping It Up
- Recap of Key Rust Concepts
- Next Steps for Further Learning and Practice