A deep-dive course on Rust systems programming — from ownership fundamentals to concurrency, async, and unsafe code — designed for developers who already know at least one language and want to internalize Rust’s safety guarantees.
The English track covers every chapter below. The Vietnamese track is in progress: Chapter 1 is available; later chapters are planned. See Chapter 00 on the Vietnamese sidebar for the current status.
Course Objectives
-
Master Rust’s ownership, borrowing, and lifetime system so you can reason about memory correctness without a garbage collector.
-
Build fluency with Rust’s type system — traits, generics, enums, and pattern matching — and apply them to write expressive, zero-cost abstractions.
-
Write safe concurrent and asynchronous programs using threads, channels, Arc<Mutex<T>>, and async/await with Tokio.
-
Understand when and how to use unsafe Rust responsibly, and how to interoperate with C/C++ via FFI.
-
Develop production-quality Rust code: structured error handling, comprehensive testing, benchmarking, and macro authoring.
Course Outline
Chapter 1: Foundations
- Setup, Cargo, and the Rust toolchain
- Your first Rust program
- Primitive types and operators
- Control flow and pattern matching basics
- Modules, crates, and package layout
- Modern applications — sparse crates.io, rust-analyzer, WASI 0.2, Edition 2024 (optional; EN+VI)
Chapter 2: Ownership and Core Types
- Ownership fundamentals — move semantics and the stack/heap model
- Borrowing rules and the borrow checker
- Slices and string types
- Structs, methods, and associated functions
- Enums,
Option<T>, and Result<T, E>
- Modern applications — Binder, Linux 6.1+ Rust, CISA memory-safe roadmaps (optional)
Chapter 3: Traits and Robustness
- Error handling with
?, thiserror, and anyhow
- Advanced error propagation patterns
- Collections, iterators, and iterator adaptors
- Traits I — defining and implementing traits
- Traits II — trait objects and dynamic dispatch
- Modern applications — RFC 3185 async traits, hashbrown, anyhow/thiserror at scale (optional)
Chapter 4: Advanced Ownership
- Lifetimes I — annotating references
- Lifetimes II — lifetime elision and complex scenarios
- Designing ownership-friendly APIs
- Smart pointers —
Box, Rc, Arc
- Interior mutability —
Cell, RefCell, Mutex
- Modern applications — Tokio
Arc, rustc arenas, Wasmtime stores, GATs (optional)
Chapter 5: Concurrency and Async
- Concurrency I — threads and
std::sync
- Concurrency II — message passing and shared state
- Async I —
async/await fundamentals
- Async II — Tokio and async I/O
- Testing I — unit and integration tests
- Modern applications — Pingora, Tokio/
hyper/axum, tokio-console (optional)
Chapter 6: Systems and Advanced Topics
- Testing II — property-based and fuzz testing
- Macros — declarative and procedural
- Unsafe Rust — raw pointers and invariants
- FFI and C interoperability
- Capstone project
- Modern applications — Cranelift/Wasmtime, PyO3/
cxx, Miri, cargo-fuzz (optional)
Chapter 7: Desktop App Programming
- GUI landscape — framework survey, rendering models compared, why GPUI
- GPUI — App, Window, View, Render; Model entities and subscriptions; element API; async tasks
- Layout systems — box model, constraint trees, flex layout, spacing and alignment (no CSS)
- OS concepts — processes vs threads, event loop anatomy, file system, timers
- Networking fundamentals — TCP, WebSocket, HTTP vs persistent connections, Serde, connection lifecycle
- App architecture — events → state → render pipeline, Tokio channels, practical checklist
- Modern applications — Zed/GPUI 2, Tauri 2.0, COSMIC/iced (optional)
Chapter 8: Operating Systems Programming
- Processes and signals — spawning processes, pipes, Unix signal model, safe signal handling
- Files, file descriptors, and low-level I/O — VFS,
std::fs, raw File, mmap
- Memory management — virtual memory, stack vs heap, custom allocators, arenas
- Inter-process communication — anonymous pipes, FIFOs, Unix sockets, shared memory
- System calls, libc, and the nix crate — syscall mechanism, POSIX API,
epoll, strace
- Rust in the kernel and on bare metal —
#![no_std], MMIO, Linux kernel modules, embedded-hal (optional)
- Modern applications — Embassy, Ferrocene, Rust Binder, WASI 0.2 (optional)
Main Textbooks
-
Steve Klabnik and Carol Nichols, The Rust Programming Language, No Starch Press, 2023. (Available free at doc.rust-lang.org/book)
-
Jon Gjengset, Rust for Rustaceans, No Starch Press, 2021.
References
Additional Resources
How to Contribute
We welcome contributions from the community! Whether you want to fix a typo, add an example, or contribute a whole new chapter, your help is appreciated.
Ways to Contribute
- Fix errors: Found a typo or mistake? Submit a fix!
- Add examples: Share practical examples or exercises
- Improve explanations: Make concepts clearer
- Translate content: Help make the course available in more languages
- Add resources: Suggest additional reading materials or tools
Getting Started
- Fork the repository on GitHub
- Clone your fork to your local machine
- Create a new branch for your changes
- Make your changes following our style guide
- Test your changes locally
- Submit a pull request with a clear description
Style Guidelines
- Use clear, concise language
- Follow the existing formatting conventions
- Include examples where appropriate
- Test all code snippets
- Use proper LaTeX formatting for mathematical expressions
Questions?
If you have questions about contributing, please:
Thank you for helping improve this course!
Welcome to Rust Programming: From Foundations to Systems Mastery
Rust is not just another programming language — it is a paradigm shift in how developers reason about correctness, performance, and concurrency. By enforcing memory safety at compile time through its ownership model, Rust eliminates entire classes of bugs — null pointer dereferences, data races, use-after-free errors — without relying on a garbage collector. The result is software that is both safe and fast.
This course takes you from Rust’s foundational syntax and tooling through to production-level systems programming, including async runtimes, unsafe code, and FFI interoperability.
What You’ll Learn
Throughout this course, you will:
- Internalize the ownership, borrowing, and lifetime system — the core of everything Rust does
- Write expressive code using traits, generics, enums, and pattern matching
- Build safe concurrent and asynchronous programs with threads, channels, and Tokio
- Understand
unsafe Rust and C interoperability for systems-level work
- Develop robust software with structured error handling, testing, and benchmarking
Prerequisites
This course targets advanced beginners to intermediate developers. You should be comfortable with at least one programming language (C++, Java, Python, or similar) and familiar with basic concepts such as functions, loops, and data structures. Prior exposure to pointers or references is helpful but not required — the course explains memory concepts from first principles in Rust’s terms.
How to Use This Course
Each chapter builds on the previous, so working through them in order is recommended. Each lecture is self-contained and includes:
- Conceptual explanations that build from intuition to formal understanding
- Evolving code examples — from naive to idiomatic Rust — with compiler errors treated as teaching moments
- Reflective prompts to deepen your mental model
- Exercises ranging from conceptual reasoning to full implementation tasks
Use the sidebar to navigate chapters. Use the language toggle in the header to switch between English and Vietnamese.
Language tracks / Lộ trình ngôn ngữ
- English — the full course (Chapters 1–8) is available now.
- Tiếng Việt — đang được xây dựng. Chương 1 (Nền tảng và công cụ) đã có bản dịch. Các chương còn lại sẽ được bổ sung dần. Mở Chương 00 trên lộ trình tiếng Việt để xem trạng thái, hoặc chuyển ngôn ngữ từ một bài Chương 1.
Support and Feedback
If you have questions or spot an issue, please open an issue on the GitHub repository or contact the instructor via the Authors page.
Let’s start building safe, fast systems in Rust.
Course Creators
Lead Instructor
[Your Name]
- Position: [Your Title/Position]
- Institution: [Your Institution]
- Email: your.email@example.com
- Website: Your Website
About the Instructor
[Write a brief bio about yourself, including your background, expertise, teaching philosophy, and what motivated you to create this course. This helps students connect with you and understand your perspective.]
Example:
I am a [your title] with [X years] of experience in [your field]. My research interests include [topics], and I have published [number] papers in [areas]. I created this course to help students understand [subject] in a practical and accessible way.
Teaching Assistants
[TA Name 1]
- Role: [Specific responsibilities]
- Email: ta1@example.com
[TA Name 2]
- Role: [Specific responsibilities]
- Email: ta2@example.com
Contributors
We welcome contributions from the community! See our Contributors page for a full list of people who have helped improve this course.
Acknowledgments
This course was made possible with support from:
- [Institution/Organization Name]
- [Funding Source, if applicable]
- [Any other acknowledgments]
Special thanks to all students who provided feedback and helped improve the course materials.
About the Authors
Lead Instructor
[Your Name]
Position: [Your Title]
Institution: [Your Institution]
Email: your.email@example.com
Website: https://your-website.com
LinkedIn: Your LinkedIn Profile
Background
[Write a detailed bio about yourself, including:]
- Your educational background
- Your professional experience
- Your research interests
- Your teaching philosophy
- Publications or notable achievements
- Why you created this course
Research Interests
- [Research area 1]
- [Research area 2]
- [Research area 3]
Co-Authors / Teaching Team
[Co-Author Name 1]
Role: [Teaching Assistant / Co-Instructor]
Email: coauthor1@example.com
Brief bio and contributions to the course.
[Co-Author Name 2]
Role: [Teaching Assistant / Co-Instructor]
Email: coauthor2@example.com
Brief bio and contributions to the course.
Course Development
This course was developed over [time period] with the goal of [course goals]. The materials have been refined through [number] iterations based on student feedback and evolving best practices in [field].
For questions about the course content, please contact:
- General inquiries: your.email@example.com
- Technical issues: Open an issue on GitHub
- Collaboration opportunities: [Contact form or email]