3.5 KiB
3.5 KiB
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, beSend + Sync, never use(), and keepDisplaymessages lowercase without trailing punctuation. Quoted verbatim in lesson 0006. - std:
std::error::ErrorTwo screens, and it is the definition of what an error is: theDebug + Displaysupertraits, plussource()for a wrapped cause. States the rule that a cause belongs in eithersource()orDisplay, 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.htmlis built from it. - std:
std::str::FromStrOne screen, and it is what.parse()calls. Use for: the associated-type pattern (type Err) and thePointexample, which is the same shape asTaskin 0007. - std:
std::fsandstd::io::ErrorKindUse for: exact signatures ofread_to_string/write, and the list of io failure kinds you can match on.ErrorKind::NotFoundis 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
trpldependency already sits unused inget-dependecies/, signaling this is coming. - Deliberately deferred, not missing:
thiserror(derives theDisplay/Fromcode written by hand in 0006) andanyhow(application-levelBox<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.rsand 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.