- Learning Guide for Rustaceans
- Installing Rust (rustup)
- Rust Toolchain (cargo, rustc, rustfmt, clippy)
- Project Structure (
src/,Cargo.toml)
- Variables & Mutability
- Constants & Static Variables
- Shadowing
- Primitive Data Types
- Complex Data Types (Arrays, Tuples, Slices, Strings)
- Functions
- Control Flow:
if,match,loop,while,for
- Ownership
- Borrowing (references, mutable references)
- Move semantics
- Copy vs Clone
- Lifetimes
- Memory Safety Rules
- Stack vs Heap
- Drop Trait and RAII Basics
- Structs
- Enums
- Tuples
- Pattern Matching & Destructuring
- Collections (Vec, HashMap, HashSet, BTreeMap, etc.)
- Option & Result
- Iterators
- Closures
- Implementing Custom Types (
impl, methods, associated functions)
- Modules & Paths (
mod,pub,super,crate) - Crates (binary vs library)
- Packages & Workspaces
- Re-exporting modules (
pub use) - Standard Library Overview
- Generics
- Traits
- Trait Objects (
dyn Trait) - Associated Types
- Type Aliases
- Advanced Lifetimes
- PhantomData
- Sized / Unsized Types
- Newtype Pattern
- Result & Option
?operator- Panic & Unwinding
- Custom Error Types (thiserror / anyhow)
- Error Propagation Best Practices
- Threads
- Send & Sync
- Arc
- Mutex
- RwLock
- Condvar
- Atomics
async/await- Futures
- Executors (Tokio, async-std)
- Channels (sync & async)
- Select operations
- Object-Oriented Programming Concepts
- Functional Programming Concepts
- Closures & Higher-Order Functions
- Declarative Macros (
macro_rules!) - Procedural Macros
- Derive macros
- Attribute macros
- Function-like macros
- Build scripts (
build.rs)
- Threads & Concurrency
async/await- Channels & Message Passing
- Mutex & RwLock
- File I/O (std::fs, std::io)
- Reading/Writing text & binary files
- Serialization / Deserialization with Serde
- JSON, YAML, TOML
- Building CLI tools
- Networking (TCP, UDP, HTTP)
- REST APIs (Axum, Actix, Rocket)
- Closures
- Higher-order functions
- Iterator combinators
- Composition over inheritance
- Polymorphism through traits
- When to use Unsafe Rust
- Raw pointers
unsafeblocks- FFI with C
- Memory layout (
repr) - Inline assembly
- Zero-cost abstractions
- Unit Testing
- Integration Testing
- Documentation Tests
- Debugging (gdb/lldb)
- Logging (tracing/log)
- Profiling & Benchmarks
- Criterion
- Flamegraphs
- Linting (Clippy)
- Formatting (rustfmt)
- Rust Analyzer (LSP)
- Organizing modules & workspace architecture
- Release profiles
- Cross-compilation
- CI/CD pipelines for Rust
- Dockerizing Rust applications
- Python β Rust (PyO3, pyo3-maturin)
- Node β Rust (NAPI-RS)
- WASM (WebAssembly)
- Embedding Rust in other languages
- Calling Python/C++ from Rust
- Smart Pointers (Box, Rc, Arc, Weak)
- Atomics & Memory Ordering
- Data-Oriented Design (SoA vs AoS, SIMD)
- cargo features & workspace patterns
- Publishing crates
- Popular libraries & frameworks:
- Tokio
- Axum
- Serde
- Clap
- SQLX / SeaORM
- Tonic (gRPC)
I have written the examples with AI / Data use cases
| Category | Pattern | Rust Example |
|---|---|---|
| Creational | Singleton | Rust Code |
| Builder | Rust Code | |
| Abstract Factory | Rust Code | |
| Behavioural | Command | Rust Code |
| Observer | Rust Code | |
| Strategy | Rust Code | |
| State | Rust Code | |
| Iterator | TODO | |
| Structural | Adapter | Rust Code |
| Decorator | Rust Code | |
| Facade | TODO | |
| Proxy | TODO |
| Framework | Purpose | tag |
|---|---|---|
| Tuari | to create small, fast, secure, cross-platform applications | cross-platform |
| dioxus | to building fullstack web, desktop, and mobile apps. | cross-platform |
| Burn | Deep learning framework like Pytorch for python | AI/ML |
| rig | Build modular and scalable LLM Applications in Rust | AI/LLM |
| axum | web application framework like fastapi in python | web |
| Yew | web assembly framework | web |
| leptos | web app framework similar like Yew | web |
| crux | Cross-platform app development in Rust | cross-platform |
| iced | Cross-platform GUI library | GUI |
| ratatui | Terminal User Interfaces | GUI |
| Online Books | Short Note |
|---|---|
| Awesome Rust Books | Offcourse, Awesome ! |
| Rust Design Patterns | Important for production system and software principles |
| Comprehensive Rust | free Rust course developed by the Android team at Google |
| Easy Rust | Explained little more simple language and easy to follow. |
| Fast Track to Rust | Learn while building grep-like program, called rustle |
| Rust 101 | Outdated may be but i liked the explanations. |
| The Little Book of Rust Macros | Learn about rust macros in detail |
| Course title | Publisher |
|---|---|
| beginners-series-to-rust | Microsoft |
// toolchain commands
cargo new rust-learning --bin
cargo run
cargo new utils --lib
cargo run --example <filename>
cargo build --bin another-bin
cargo run --bin rust-learning
cargo run --bin another-binTODO: will have to convert into Macro.md file
- #[allow(dead_code)]
- Discord : https://discord.gg/rust-lang-community
π Support My Open source Work