<<Download>> Download Microsoft Word Course Outline Icon Word Version Download PDF Course Outline Icon PDF Version

Updated June 2026

Rust for Python Programmers

Class Duration

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

Student Prerequisites

  • Strong working proficiency in Python
  • Comfort with packaging (pip, uv, poetry) and virtual environments
  • Familiarity with type hints and mypy/pyright is helpful but not required

Target Audience

Python developers and ML/data engineers adding Rust to their toolkit — for performance-critical hot paths, native Python extensions, async services, CLIs, or memory-safe rewrites of legacy components. Particularly relevant for teams shipping LLM applications who need a fast, safe runtime for the parts of the system Python isn't well suited to.

Description

This course gives Python developers a structured pathway to production Rust on the 2024 edition (Rust 1.85 introduced the edition; 1.96+ recommended for the current toolchain). Every concept is introduced in contrast with the Python equivalent: ownership vs. reference counting, Result/Option vs. exceptions, traits vs. protocols, async/await on Tokio vs. asyncio, monomorphized generics vs. duck typing. The course closes with a hands-on PyO3 module that takes a Python hot path, rewrites it in Rust, releases the GIL, and ships as a wheel — the workflow most Python teams actually adopt Rust for. Throughout, students use AI coding assistants (Claude Code, Cursor, GitHub Copilot) the way senior engineers use them in 2026, with the compiler and clippy as the source of truth.

Learning Outcomes

  • Read and write idiomatic Rust on the 2024 edition with confidence in ownership, borrowing, and lifetimes.
  • Translate Python idioms to Rust and vice versa, knowing where each language is the right tool.
  • Build CLIs, library crates, and async services on Tokio.
  • Apply traits and generics where Python developers would reach for protocols and duck typing.
  • Write a PyO3 + Maturin extension module that releases the GIL on CPU-bound work and ships as a wheel.
  • Use AI coding assistants effectively for Rust while letting the compiler, clippy, and tests catch what AI gets wrong.

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 latest stable Rust toolchain installed via rustup (Rust 1.96+ on the 2024 edition), Python 3.12+, Visual Studio Code or another supported editor with the rust-analyzer extension, 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: Rust from a Python Perspective

  • What Rust is and where it fits relative to Python
  • Rust 2024 edition: what's new and why it matters
  • Rust vs. Python: type system, runtime, packaging, performance
  • The Rust ecosystem: crates.io, lib.rs, the Rust community

Toolchain and Editor Setup

  • Installing Rust with rustup
  • cargo vs. pip/poetry/uv: similarities and differences
  • VS Code, JetBrains RustRover, and Zed with rust-analyzer
  • AI assistants for Rust: Copilot, Cursor, and Claude Code
  • The Rust Playground for quick experimentation

Cargo and Crates

  • cargo new, cargo run, cargo build, cargo test
  • Cargo.toml and dependencies vs. pyproject.toml
  • Workspaces and cargo publish --workspace
  • Popular crates: serde, tokio, reqwest, sqlx, anyhow, thiserror, tracing

Rust vs. Python: A Working Map

  • Static typing vs. dynamic typing
  • Memory management: ownership vs. reference counting + GC
  • Errors: Result/Option vs. exceptions
  • Iteration: iterators vs. generators
  • Classes vs. structs + impls
  • Protocols vs. traits
  • Concurrency: GIL + asyncio vs. fearless concurrency + Tokio

Scalar Types, Control Flow, and Functions

  • Integers, floats, booleans, characters
  • Constants and statics
  • if/else as expressions, loop, while, for
  • 2024-edition let-chains in if and while
  • Functions, closures, and capture modes

Modules and the Standard Library

  • Module hierarchy with mod and use
  • Importing from the standard library and crates.io
  • Re-exports and visibility
  • prelude patterns

Built-In Macros

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

Memory Management and Ownership

  • Ownership, moves, copies
  • Borrowing: &T and &mut T
  • Lifetimes and the borrow checker
  • Box, Rc, Arc, and when each is appropriate
  • Drop and the Drop trait
  • Common Python-developer pitfalls

Strings and Collections

  • String vs. &str and the cost of conversions
  • Vectors, slices, and arrays
  • HashMap, HashSet, BTreeMap, BTreeSet
  • Iterators and combinators (map, filter, fold, try_fold)

Tuples, Enums, Structs

  • Tuples and tuple structs
  • Enums with associated data, variants, and methods
  • Option<T> and Result<T, E> as the cornerstone of Rust error handling
  • Structs, methods, associated functions, constructors
  • The newtype pattern

Pattern Matching

  • match, if let, while let, and 2024 let-chains
  • Destructuring nested data
  • Guards, bindings, and @ patterns
  • Refutable vs. irrefutable patterns

Traits and Generics

  • Defining and implementing traits
  • Default methods and supertraits
  • Trait objects (dyn Trait)
  • Generics, bounds, and where clauses
  • Static dispatch (monomorphization) vs. dynamic dispatch
  • Async fn in traits

Async/Await with Tokio

  • The async/await mental model from a Python asyncio perspective
  • Tokio runtime fundamentals
  • 2024-edition async closures
  • tokio::select!, JoinSet, structured cancellation
  • HTTP with reqwest, JSON with serde, databases with sqlx

Concurrent Programming

  • Threads vs. async tasks
  • Send, Sync, and the data-race story
  • Arc, Mutex, RwLock, channels
  • A short tour of rayon for data parallelism

Tests, Documentation, and Quality

  • Unit tests, integration tests, doctests
  • Property-based testing with proptest
  • rustdoc and writing documentation that compiles
  • clippy and rustfmt in CI

PyO3 and Python Extensions in Rust

  • Why write Python extensions in Rust
  • PyO3 + Maturin workflow
  • Defining Python modules, classes, and functions in Rust
  • Type conversions and exceptions across the boundary
  • Releasing the GIL for CPU-bound work
  • Calling Python from Rust
  • Building, packaging, and publishing wheels

AI-Assisted Rust Development for Python Engineers

  • The 2026 AI-coding-tool landscape and how Python developers use it for Rust
  • Prompts that work well for Rust ownership and lifetimes
  • Letting the compiler, clippy, and tests catch what AI gets wrong
  • Reviewing AI-generated unsafe, unwrap, and reflexive Arc<Mutex<T>>
  • Agentic Rust workflows: AI-assisted refactors, code review, and CI
<<Download>> Download Microsoft Word Course Outline Icon Word Version Download PDF Course Outline Icon PDF Version