Rustdoc
Rustdoc is Rust's built-in documentation generator. It reads the ///
and //! doc comments in your source and produces browsable HTML — the same
tooling that generates the standard library docs and every crate on
docs.rs.
Rules
- rust_doc — Build HTML documentation for a
rust_library,rust_binary, orrust_proc_macrotarget. Output is a directory tree suitable for hosting on a static site. - rust_doc_test — Compile and run the code samples embedded
in a crate's doc comments as tests, matching Cargo's
cargo test --docbehavior.