LinuxCommandLibrary
GitHubF-DroidGoogle Play Store

cargo-doc

Generate documentation for a Rust package

TLDR

Build documentation
$ cargo doc
copy
Build and open in browser
$ cargo doc --open
copy
Build without dependencies
$ cargo doc --no-deps
copy
Include private items
$ cargo doc --document-private-items
copy
Build for all workspace members
$ cargo doc --workspace
copy
Build with release profile
$ cargo doc --release
copy
Build with all features
$ cargo doc --all-features
copy

SYNOPSIS

cargo doc [options]

DESCRIPTION

cargo doc builds documentation for the local package and all dependencies using rustdoc. Output placed in target/doc/ in HTML format.

PARAMETERS

--open

Open documentation in browser after building
--no-deps
Don't build documentation for dependencies
--document-private-items
Include non-public items (default for binaries)
-r, --release
Build with release profile
--workspace
Document all workspace members
--exclude spec
Exclude packages (with --workspace)
-p, --package spec
Document specific packages
--lib
Document library only
--bins
Document all binaries
--target triple
Document for target architecture
-j, --jobs n
Parallel jobs (default: CPU count)
--features features
Enable specified features
--all-features
Enable all features
--no-default-features
Disable default features

ENVIRONMENT

BROWSER

Browser to use with --open

OUTPUT

Documentation generated in target/doc/<crate_name>/index.html

INSTALL

sudo apt install cargo
copy
sudo dnf install cargo
copy
sudo apk add cargo
copy
sudo zypper install cargo
copy
nix profile install nixpkgs#cargo
copy

CAVEATS

Skips binaries with same name as library. Skips binaries with missing required features.

SEE ALSO

cargo(1), rustdoc(1)

RESOURCES

Braincup
Open source brain training for math, memory and focus
Braincup mini-games
41 mini-games · Apache-2.0
No ads · No tracking
Play in browser
Download Braincup on the App StoreGet Braincup on Google PlayGet Braincup on F-Droid
276 stars
From the maker of Linux Command Library
Copied to clipboard
Braincup
Open source brain training for math, memory and focus. 41 mini-games, from mental arithmetic to Sudoku, N-Back and Solo Chess.
Apache-2.0 licensed · No ads · No tracking · No account
From the maker of Linux Command Library
Download Braincup on the App StoreGet Braincup on Google PlayGet Braincup on F-Droid