cargo

Rust cargo doc

Generate browsable API pages for a package. Exclude dependency documentation when learning your own API. Example format: shell. Run in a disposable copy of v16/fixtures/projects/profile-demo. Expected result (not executed): Documentation for profile_demo under the target doc directory. Common mistake: Confusing documentation generation with running documentation tests.

Formal Syntax & Structure

rust syntaxrust
cargo doc [OPTIONS]

Working Example

Example Snippetrust
cargo doc --offline --no-deps
Rust Reference