Loading RustViz Engine...
Observe how the compiler manages 24-byte fat pointer stack descriptors, dynamic heap buffer transfers, and zero-cost automatic drops.
Step through Rust execution to observe fat pointers, ownership transfer, and deterministic deallocation.
let s1 = String::from("Ferris");Assigning a heap-backed variable in Rust only copies the 24-byte pointer metadata on the stack. The source variable is statically marked uninitialized.
Because moved variables are invalidated, when the enclosing scope exits, only the active owner's Drop implementation triggers memory deallocation.
Types implementing Copy (i32, bool, [T; N]) duplicate their bits on the stack. Heap types require explicit .clone() to duplicate buffers.