Rust Programming Certificate for Tan Bao Nguyen
Certificate ID:
803571
Authentication Code:
18548
Certified Person Name:
Tan Bao Nguyen
Trainer Name:
Andy Thomason
Duration Days:
3
Duration Hours:
21
Course Name:
Rust Programming
Course Date:
24 March 2025 09:30 to 26 March 2025 16:30
Course Outline:
General Rust
- Rust ownership / borrow rules / lifecycles
- Smart pointers - Box, RefCell
- Traits and trait bounds
- Pattern matching
- Unsafe
- Unwrap
- ARC / Drop order / how nested structs are managed
- RAII
- Dynamic dispatch / static dispatch / monomorphism / polymorphism
- Iteration / streams
- Error handling (lack of exceptions)
- Modules and visibility rules
- Dependency management
- Semver
- Cargo
- Useful crates (e.g. Dashmap)
- Clippy
- Macros (time-permitting)
Async Rust
- Concept of green threads
- Issues with blocking code / per-request thread model / context switches overhead
- Linear code, much simpler to understand than chained callbacks
- Understanding cooperative scheduling
- Futures / polling: explain how poll() works, wakers, state machine(?)
- What does it desugar into ?
- Tokio executor: work stealing / LIFO slot optimization
- Single epoll task (explain polling multiple file descriptors)
- Caveats of cooperative scheduling
- High poll times (10us as a rule of thumb), CPU intensive tasks
- Using blocking code
- Blocking indefinitely one task is undefined behaviour, it might hang your application indefinitely
- Never yielding
- Task cancellation
- Explain that disk I/O operations are emulated through spawn_blacking
- Tokio
- Tokio single-threaded / multi-threaded runtimes
- Channel types (mpsc, broadcast)
- Async traits
- Send / Sync
- Pin / Unpin ??
Debugging / profiling / benchmarking
- Tools/techniques for profiling running code
- Flamegraphs
- Valgrind
- Benchmarking (benches directory?)
- Troubleshoot high memory usage: jemalloc / massif / dhat
- Tokio console demo
- Debugging core dumps with gdb
- Tokio runtime metrics
Course Name Eng:
Rust Training - Bespoke