LinuxCommandLibrary
GitHubF-DroidGoogle Play Store

cargo-rustdoc

Build documentation with extra rustdoc flags

TLDR

Build docs with rustdoc options
$ cargo rustdoc -- [rustdoc_flags]
copy
Document with private items
$ cargo rustdoc -- --document-private-items
copy
Output JSON format (nightly)
$ cargo rustdoc -Z unstable-options --output-format json
copy
Document specific binary
$ cargo rustdoc --bin [name] -- [flags]
copy
Build docs for all features
$ cargo rustdoc --all-features
copy

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)

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

Only one target can be documented when passing extra arguments. Use target filters to select.

SEE ALSO

cargo(1), cargo-doc(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