rust-memory-and-state

Installation
SKILL.md

Rust Memory and State

Use this when the question is really "who owns this, who may mutate it, and how long must it stay valid?"

Working stance

  • Prefer one clear owner and cheap borrowed reads.
  • Reach for cloning last, not first.
  • If cloning appears mainly to placate the borrow checker, fix the data flow before keeping the clone.
  • Treat Rc, Arc, RefCell, Mutex, and RwLock as ownership decisions, not syntax bandages.
  • If a lifetime gets hard to express, ask whether the type should own the data.
  • Use RAII to make cleanup happen by scope, not by hope.

Decision surface

Installs
3
GitHub Stars
3
First Seen
Apr 22, 2026