Blog Posts
Thoughts on technology, programming, and development
-
Rust: How Thread-Local Storage Actually Works
A deep dive into Rust’s Thread-Local Storage implementation — exploring thread_local!, #[thread_local], eager vs lazy storage, destructor registration, and how TLS behaves inside async runtimes like Tokio.
-
Memory Allocation in Rust: Box, Vec, and the Global Allocator
A concise dive into Rust heap allocation: how Box and Vec use the global allocator, compute layouts, grow capacity, and safely deallocate via drop glue.
-
Rust: How the Compiler Manages Lifetimes
This post explores how Rust lifetimes and ownership are enforced at the assembly level, showing when rust_dealloc is called during moves vs borrows — all without any runtime overhead.