Rust Lifetimes: 'static, Annotations and Elision Rules

Learn how Rust models lifetimes for stack and heap, and how the compiler enforces constraints across function calls. Walk through ‘static vs dynamic lifetimes, lifetime parameters and elision rules, fixing the classic max example, a strtok exercise, and annotating structs—plus when to annotate vs rely on inference.

August 17, 2025 · 11 min · Garry Chen

Rust Rc, Arc, RefCell: Shared Ownership & Concurrency

Master Rust’s shared ownership and runtime checks. Use Rc/Arc for multiple owners, RefCell for interior mutability, and Mutex/RwLock for thread-safe state. Includes a DAG example and a clear look at Box::leak, plus when to prefer static checks vs dynamic checks.

August 11, 2025 · 11 min · Garry Chen

Rust Borrowing & References: Lifetimes and Borrow Checker

Hands-on guide to Rust borrowing. See how pass-by-value differs from explicit references, when to use read-only vs mutable borrows, and why borrows can’t outlive owners. Includes address demos, lifetimes, and practical fixes for borrow checker errors.

August 9, 2025 · 11 min · Garry Chen

Rust Ownership and Lifetimes Explained: Clear Examples

Demystify Rust’s ownership and lifetimes with a step-by-step, stack-first model. See how variables move and borrow across function calls, why the borrow checker complains, and how to resolve errors using references, moves, and explicit lifetimes through clear, practical examples.

August 8, 2025 · 11 min · Garry Chen

Build SQL Query Engine in Rust: CSV Parser with Python Bindings

Build a production-ready SQL query engine in Rust with just 375 lines of code. Learn to parse SQL with custom dialects, convert AST between SQL and DataFrame operations, query CSV files from URLs, implement trait-based architecture for extensibility, and create Python bindings with PyO3. This advanced tutorial covers lifetimes, macros, pattern matching, and cross-language interoperability while building a real-world data processing tool.

August 6, 2025 · 24 min · Garry Chen