PART 2 - Core Rust Foundations
Core Rust Foundations
Not baby Rust. This part builds every surface you will use daily — variables, types, functions, ownership, borrowing, structs, enums, error handling, and module architecture — so that the deep chapters feel like deepening, not contradiction.
Part 2 Chapter Prerequisites
A Blueprint of Rust's Everyday Building Blocks
Part 2 is not “baby Rust.”
It is where a professional programmer learns Rust’s surface area correctly the first time, before bad habits harden. The point is not to memorize syntax tables. The point is to understand what the everyday tools of the language are preparing you for:
- explicit ownership
- visible mutability
- expression-oriented control flow
- type-driven absence and failure
- module boundaries that are architectural, not cosmetic
Everything here is foundational. If you read it carelessly, later chapters feel harder than they are. If you read it with the right mental model, later chapters feel like deepening, not contradiction.
Chapters in This Part
- Chapter 4: Environment and Toolchain
- Chapter 5: Cargo and Project Structure
- Chapter 6: Variables, Mutability, and Shadowing
- Chapter 7: Types, Scalars, Compounds, and the Unit Type
- Chapter 8: Functions and Expressions
- Chapter 9: Control Flow
- Chapter 10: Ownership, First Contact
- Chapter 11: Borrowing and References, First Contact
- Chapter 11A: Slices, Borrowed Views into Contiguous Data
- Chapter 12: Structs
- Chapter 13: Enums and Pattern Matching
- Chapter 14:
Option,Result, and Rust’s Error Philosophy - Chapter 15: Modules, Crates, and Visibility
Part 2 Summary
Part 2 is where Rust’s everyday surface becomes coherent:
- tooling makes workflow disciplined
- Cargo makes build and dependency structure explicit
- mutability is visible, not ambient
- types carry real meaning
- functions and control flow are expression-oriented
- ownership and borrowing begin as responsibility and access
- slices generalize borrowed views
- structs and enums shape data clearly
OptionandResultmake absence and failure explicit- modules and visibility make boundaries intentional
This is the foundation the rest of the handbook keeps building on. Not because these are “basic features,” but because they are the everyday faces of Rust’s deeper design.