cargo-rustdoc man page

cargo-rustdoc — Build a package's documentation, using specified custom flags.


cargo rustdoc [Options] [--] [<OPTS>...]


The specified target for the current package (or package specified by SPEC if provided) will be documented with the specified <OPTS>... being passed to the final rustdoc invocation. Dependencies will not be documented as part of this command. Note that rustdoc will still unconditionally receive arguments such as -L, --extern, and --crate-type, and the specified <OPTS>... will simply be added to the rustdoc invocation.

If the --package argument is given, then SPEC is a package id specification which indicates which package should be documented. If it is not given, then the current package is documented. For more information on SPEC and its format, see the cargo help pkgid command.


-h, --help
Print this message.
Open the docs in a browser after the operation.
-p SPEC, --package SPEC
Package to document.
-j N, --jobs N
Number of parallel jobs, defaults to # of CPUs.
Build only this package's library.
--bin NAME
Build only the specified binary.
--example NAME
Build only the specified example.
--test NAME
Build only the specified test target.
--bench NAME
Build only the specified benchmark target.
Build artifacts in release mode, with optimizations.
--features FEATURES
Space-separated list of features to also build.
Do not build the default feature.
--target TRIPLE
Build for the target triple.
--manifest-path PATH
Path to the manifest to document.
-v, --verbose
Use verbose output.
-q, --quiet
No output printed to stdout.
--color WHEN
Coloring: auto, always, never.

See Also

cargo(1), cargo-doc(1)


Explore man page connections for cargo-rustdoc(1).