Short Course on Rust for Python Programmers
Class Duration
21 hours of live training delivered over 3-5 days to accommodate your scheduling needs.
Student Prerequisites
- Strong working proficiency in Python
- Comfort with type hints, packaging, and the command line
- No prior Rust experience required
Target Audience
Python developers who need a fast, focused on-ramp to Rust on the 2024 edition. Designed for engineers building performance-critical services, native Python extensions, CLIs, or memory-safe replacements for legacy components — and for ML/data engineers shipping LLM applications who need a fast, safe runtime for the parts of the system Python isn't well suited to.
Description
This short course gets Python developers productive in Rust on the 2024 edition (Rust 1.85 introduced the edition; 1.95+ recommended for the current toolchain) in three days. 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 the workflow most Python teams adopt Rust for: a small PyO3 + Maturin extension that takes a hot path, rewrites it in Rust, and ships it as a wheel. Throughout, students use AI coding assistants (Claude Code, Cursor, GitHub Copilot) as senior engineers do 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 and borrowing.
- Translate Python idioms to Rust and vice versa, knowing where each language is the right tool.
- Build a small CLI or library crate with Cargo, including dependencies, tests, and documentation.
- Use traits, generics, and pattern matching where Python developers reach for protocols, duck typing, and
matchstatements. - Get an honest first taste of async/await on Tokio.
- 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. Students practice the topics covered through challenging hands-on lab exercises that build directly on Python idioms.
Software Requirements
A free GitHub account, the latest stable Rust toolchain installed via rustup (Rust 1.95+ 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 and community
Toolchain and Editor Setup
- Installing Rust with
rustup cargovs. pip/poetry/uv: similarities and differences- VS Code, JetBrains RustRover, and Zed with rust-analyzer
- AI assistants for Rust: Copilot, Cursor, and Claude Code
Cargo and Crates
cargo new,cargo run,cargo build,cargo testCargo.tomland dependencies vs.pyproject.toml- Workspaces and
cargo publish --workspace - Popular crates:
serde,tokio,reqwest,sqlx,anyhow,thiserror
Rust vs. Python: A Working Map
- Static typing vs. dynamic typing
- Memory management: ownership vs. reference counting + GC
- Errors:
Result/Optionvs. 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/elseas expressions,loop,while,for- 2024-edition
let-chains inifandwhile - Functions, closures, and capture modes
Modules and Built-In Macros
- Module hierarchy with
modanduse - Importing from the standard library and crates.io
print!,println!,format!,dbg!,vec!,assert!
Memory Management and Ownership
- Ownership, moves, copies
- Borrowing:
&Tand&mut T - Lifetimes and the borrow checker
Box,Rc,Arcat a glance- Common Python-developer pitfalls
Strings, Tuples, Enums, Structs, Vectors
Stringvs.&str- Tuples and tuple structs
- Enums with associated data,
Option<T>,Result<T, E> - Structs, methods, associated functions, constructors
Vec, slices, and the iterator combinators Python developers will love
Traits, Generics, and Pattern Matching
- Defining and implementing traits
- Generics, bounds, and
whereclauses - Static vs. dynamic dispatch
match,if let,while let, 2024let-chains- Destructuring nested data
Async at a Glance
- async/await from a Python asyncio perspective
- Tokio runtime fundamentals
- 2024-edition async closures
Send/Syncand'staticbounds in async code
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 reflexiveArc<Mutex<T>>
Conclusion
- Course wrap-up and recommended next steps (Rust for Python Programmers, High Performance Python with Rust, Mastering Rust)