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

Further Reading

The course this one builds on

  • Comprehensive Rust: the fundamentals this course assumes. Its Idiomatic Rust section covers the patterns from Day 1 morning in more depth, from the author’s side.

Patterns

  • Parse, don’t validate (Alexis King): makes the case for parsing input into richer types at the boundary. The newtype page is based on it.
  • Rust API Guidelines: recommendations on how to design APIs. Useful as a checklist for a skeleton’s public surface.
  • Rust Design Patterns: covers the newtype pattern, RAII guards, and builders, and includes an anti-pattern catalog.
  • The Typestate Pattern in Rust (Cliff Biffle): describes the typestate pattern in depth, with worked examples.

Errors

  • thiserror: derive macros for defining error enums.
  • anyhow: an opaque error type with context chaining, for applications.
  • Error Handling in Rust (BurntSushi): covers error handling in detail, from Option and Result up to library design.

Testing stochastic systems

  • proptest: property-based testing with input generation and shrinking.
  • feotest: probabilistic testing with statistical verdicts. The README includes a section on the statistical basis of the verdicts.
  • criterion: statistics-driven benchmarking. Useful for questions like Project B’s “did zero-copy matter here at all?”

Safety-critical Rust