m14-mental-model

Installation
Summary

Mental models and analogies for understanding Rust ownership, borrowing, and core concepts.

  • Provides visual analogies (keys, lending, remotes) and mental models for ownership, moves, references, lifetimes, and smart pointers to build correct intuition
  • Includes misconception-to-correction mappings for common borrow checker errors (E0382, E0502, E0499, E0106, E0507) with explanations of what safety guarantee each enforces
  • Covers language-specific shifts for developers coming from Java, C++, Python, Go, and JavaScript, highlighting key differences in memory and mutability models
  • Offers stack/heap and reference visualizations to clarify how ownership transfers and borrowing rules work in practice
SKILL.md

Mental Models

Layer 2: Design Choices

Core Question

What's the right way to think about this Rust concept?

When learning or explaining Rust:

  • What's the correct mental model?
  • What misconceptions should be avoided?
  • What analogies help understanding?

Key Mental Models

Concept Mental Model Analogy
Related skills

More from zhanghandong/rust-skills

Installs
673
GitHub Stars
1.1K
First Seen
Jan 20, 2026