memory

  • 01 July 2026

The Most Horribly Unsafe Thing You Can Do in Rust

mem::transmute reinterprets raw bytes across types with almost no checks. Here’s why it’s more dangerous than raw pointers, and the layout traps that make it worse.

Read more 
  • 12 April 2026

Variance and PhantomData in Rust

How Rust’s variance system works, why std:🧵:Scope needs invariant lifetimes, and what PhantomData actually does to prevent use-after-free.

Read more 
  • 25 February 2026

Rust Memory Layout Under the Hood

A visual guide to how Rust lays out structs, Vec, String, smart pointers, and trait objects in memory — alignment rules, field reordering, and the byte-level details that shape your program’s performance.

Read more