cargo-doc (1) Linux Manual Page
NAME
cargo-doc – Build a package’s documentation
SYNOPSIS
cargo doc [OPTIONS]
DESCRIPTION
Build a package’s documentation.
By default the documentation for the local package and all dependencies is built. The output is all placed in ‘target/doc’ in rustdoc’s usual format.
If the –package argument is given, then SPEC is a package id specification which indicates which package should be built. If it is not given, then the current package is built. For more information on SPEC and its format, see the "cargo help pkgid" command.
OPTIONS
-h, –help- Print this message.
-pSPEC, –package SPEC …- Package to document.
–open- Opens the docs in a browser after the operation.
–no-deps- Don’t build documentation for dependencies.
-jN, –jobs N- Number of parallel jobs, defaults to # of CPUs.
–release- Build artifacts in release mode, with optimizations.
–featuresFEATURES- Space-separated list of features to also build.
–all-features- Build all available features.
–no-default-features- Do not build the default feature.
–targetTRIPLE- Build for the target triple.
–manifest-pathPATH- Path to the manifest to compile.
-v, –verbose- Use verbose output.
-q, –quiet- No output printed to stdout.
–colorWHEN- Coloring: auto, always, never.
EXAMPLES
Build a local package documentation in ‘target/doc’
-
$
cargo doc
SEE ALSO
cargo(1), cargo-build(1)
COPYRIGHT
This work is dual-licensed under Apache 2.0 and MIT terms. See COPYRIGHT file in the cargo source distribution.
