The Dark Secrets Lurking Inside cargo doc
summary
Shows how cargo doc actually invokes rustdoc and what rustdoc does: doc tests compiled (snippets get wrapped in main, linked to the crate, and get allow unused removed unless overridden), how doc(cfg) platform banners and cargo feature tricks make Linux and Windows docs converge, attributes like doc(include) and doc(hidden), CLI flags such as document-private-items and header HTML injection, where rustdoc lives in the compiler repo, the pretty‑printer and auto trait hacks, and demos that prove each behavior works.
AI-written summary · about
chapters (7)
- 0:00Start
- 7:58The journey of a doctest
- 9:30Dactests and Lints
- 15:43Conditional compilation vs. your docs
- 23:30A peek behind the curtain
- 27:59Highlights of rustdoc internals
- 29:52The Rustdoc Team
related talks
25mAugmented docs: a love letter to rustdoc and docs.rs
32mDocumentation in the Rust Ecosystem
18mThe Death and Rebirth of Docs.rs
16mCargo, or how to extend Rust tooling to infinity!
21mRust - Cargo Cult?
25mLessons Learned From the Rust Ecosystem That Can Be Adopted Elsewhere
25mUnlocking the full potential of Cargo extensions in Rust development
31mImproving Your Rust Life
