Files

3.5 KiB
Raw Permalink Blame History

Rust Resources

Knowledge

  • Book: The Rust Programming Language (official) Primary source for all fundamentals lessons (ch1–9 and beyond). Use for: syntax, ownership rules, canonical examples.
  • Rust by Example Terse, runnable code samples per concept, no prose. Use for: quick syntax lookup without re-reading the book.
  • std library docs Use for: exact method signatures (Vec, HashMap, Result, Option, …) when writing real code.
  • Rust API Guidelines Use for: idiomatic backend/library code once past fundamentals (naming, error types, trait design). Specifically C-GOOD-ERR — the checklist a reviewer applies to an error type: implement Error, be Send + Sync, never use (), and keep Display messages lowercase without trailing punctuation. Quoted verbatim in lesson 0006.
  • std: std::error::Error Two screens, and it is the definition of what an error is: the Debug + Display supertraits, plus source() for a wrapped cause. States the rule that a cause belongs in either source() or Display, never both.
  • Book table of contents (SUMMARY.md) The authoritative chapter list. Use for: checking coverage claims against the real book instead of memory — reference/book-coverage.html is built from it.
  • std: std::str::FromStr One screen, and it is what .parse() calls. Use for: the associated-type pattern (type Err) and the Point example, which is the same shape as Task in 0007.
  • std: std::fs and std::io::ErrorKind Use for: exact signatures of read_to_string/write, and the list of io failure kinds you can match on. ErrorKind::NotFound is the one that means "first run", not "broken".
  • Book ch12 — An I/O Project Primary source for lesson 0007: files, stderr, and env::var. 12.2 and 12.5 are the two sections that matter.

Gaps

  • No curated async/backend-framework resource yet (axum/tokio). Add once lessons reach networking — a trpl dependency already sits unused in get-dependecies/, signaling this is coming.
  • Deliberately deferred, not missing: thiserror (derives the Display/From code written by hand in 0006) and anyhow (application-level Box<dyn Error> with context). Both are what real crates use; neither teaches what the trait does. Reach for them on the second real project.

Wisdom (Communities)

  • r/rust — active, well-moderated. Use for: code review requests, "is this idiomatic?" checks.
  • users.rust-lang.org — official user forum. Use for: "why won't this compile" borrow-checker questions, and the Code Review category. First concrete ask, set after 0006: post tasks/src/error.rs and ask whether one enum for both parse and store failures is right, or whether those should be two types with a wrapping variant.
  • This Week in Rust — weekly newsletter. Use for: staying current once past fundamentals.