This section helps you learn advanced concepts to make you more comfortable in rust. The following topics will be discussed in this section:
- Memory Management
- Ownership, borrowing, and Lifetimes
cargo run --bin ownership
- Unsafe Rust
- Ownership, borrowing, and Lifetimes
- Type System and Generics
- Generic Types
cargo run --bin generics
- Trait Objects and Dynamic Dispatch
cargo run --bin traits
- Associated types and Generic Type parameters
- Lifetime Sub-typing
- Generic Types
- Concurrency and Parallelism
Async/Await
andFutures
- Task Executors
- Concurrency
- Macros and Meta programming
macro_rules!
cargo run --bin macro
- Derive Macros
cargo run --bin derive
- Building Domain-Specific Languages (DSL)
cargo run --bin dsl
- Low level and systems programming
- Conditional Compilation
cargo run --bin cc
- Inline Assembly
cargo run --bin assembly
- Foreign Function Interface (FFI)
- Embedded rust and Bare-metal programming
- Conditional Compilation
- Error handling and patterns
- Unrecoverable error and
panic!
macrocargo run --bin panic
- Recoverable error and
Result
enumcargo run --bin result
- Advanced Error Handling
- Propagating Errors with
?
operatorcargo run --bin propagation
- Custom Errors
cargo run --bin custom-error
- Propagating Errors with
- Dependency Injection patterns in rust
- Unrecoverable error and
- Specialized topics
- Writing a custom allocator
- Self-referential structs (
box
,rc
,Arc
)