cargo-rustdoc
Build documentation with extra rustdoc flags
TLDR
Build docs with rustdoc options
SYNOPSIS
cargo rustdoc [options] [-- args]
DESCRIPTION
cargo rustdoc builds documentation for the current package and passes extra options directly to the rustdoc tool. Arguments after `--` are forwarded only to the final rustdoc invocation for the specified target, not to dependencies.
This command is similar to `cargo doc` but provides fine-grained control over rustdoc flags. Common uses include documenting private items, generating JSON output for tooling (on nightly), and passing custom HTML or CSS settings. Only one target can be documented at a time when extra arguments are provided.
PARAMETERS
--open
Open docs in browser after building--lib
Document library only--bin name
Document specified binary--bins
Document all binaries--example name
Document specified example--examples
Document all examples-p, --package spec
Package to document--target triple
Document for target platform-j, --jobs n
Parallel jobs--features features
Enable features--all-features
Enable all features--no-default-features
Disable default features
OUTPUT FORMATS
html
HTML documentation (default)json
JSON format (nightly, experimental)
CAVEATS
Only one target can be documented when passing extra arguments. Use target filters to select.
