Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Rust Hero

Practical RustCompiler reasoningFast education

Rust gets easier when its features stop looking like separate rules. Ownership explains why iterator methods differ. Borrowing explains why APIs accept slices. Traits explain what generic signatures permit. Those same ideas reappear when values cross thread and task boundaries.

This book builds that connected model. It focuses first on the concepts that appear constantly in Rust code:

  • ownership, moves, and borrowing;
  • strings, vectors, and borrowed views;
  • enums, error handling, traits, iterators, closures, and lifetimes; and
  • the design choices those concepts make possible.

Concurrency and API design come next. Advanced internals are kept in a short recognition map: enough vocabulary to explain their purpose and know when they matter, without letting them crowd out the fundamentals.

own values and lend views
          │
          ▼
model states and failures
          │
          ▼
abstract over capabilities
          │
          ▼
share work safely
          │
          ▼
design APIs others can trust

The goal is not to memorize compiler messages or recite definitions. It is to look at a Rust program and answer three questions:

  1. Who owns each value?
  2. What does each type or bound guarantee?
  3. Which states and operations does the API allow?

Learn how to use the chapters →