rust-core-memory-model
Installation
SKILL.md
rust-core-memory-model
Conceptual overview of Rust's memory model. This skill teaches the mental model: ownership, move semantics, RAII, stack vs heap, smart pointer choice, interior mutability, and the Send/Sync auto-traits. Granular mechanics live in cross-referenced skills.
Cross-references: [[rust-syntax-ownership]] [[rust-syntax-borrowing]] [[rust-syntax-smart-pointers]] [[rust-syntax-async-await]]
When to use this skill
- User asks "what is ownership / moves / clones / drops in Rust"
- User confused by a "value moved here" or "cannot borrow" compiler message at the conceptual level
- User asks "should I use
RcorArc", "do I needMutexorAtomicX", "what is interior mutability" - User asks "is this
Send? is thisSync?" - User asks "what gets dropped when, and in what order"
- User asks "what does
&strcost vsString" or general stack-vs-heap questions
For the mechanics of these (exact syntax, lifetime elision, reborrow rules, smart pointer methods), refer the user to the cross-referenced skills above.