rustup-man
View Rust toolchain management documentation
TLDR
View the man page for a given command from the default toolchain
View the man page for a given command from the specified toolchain
SYNOPSIS
rustup man tool
PARAMETERS
tool
Mandatory. The specific Rust tool for which to display the manual page, e.g., rustc, cargo, or rustdoc.
DESCRIPTION
`rustup-man` is a handy subcommand of `rustup` that provides seamless access to the manual pages (man pages) for components of the Rust toolchain installed via `rustup`. It allows developers to quickly view official documentation for command-line tools like `rustc`, `cargo`, and `rustdoc` directly from their terminal. This eliminates the need to manually locate man page files or configure system `MANPATH` variables. `rustup-man` intelligently identifies the correct man page for the requested tool based on the currently active Rust toolchain, presenting comprehensive details on tool options, usage, and examples. It serves as a crucial resource for understanding the intricate functionalities of Rust's command-line ecosystem, greatly enhancing developer productivity and learning.
CAVEATS
Man pages are typically installed as part of the `rust-docs` component. If this component is not installed, `rustup-man` will not be able to find and display the documentation. Use `rustup component add rust-docs` to install it if needed.
Requires a `man` pager (like `less`) to be available and configured on your system to display the output.
Only provides documentation for official Rust toolchain components, not arbitrary system commands or third-party crates.
AUTOMATIC MANPATH HANDLING
`rustup-man` cleverly handles the `MANPATH` environment variable internally. This means users don't typically need to modify their system's `MANPATH` settings to ensure the Rust toolchain man pages are found. It automatically points to the correct man page directory for the currently active `rustup` toolchain.
HISTORY
`rustup`, the official Rust toolchain installer, was initially created by Brian Anderson in 2016 to streamline the management of Rust versions and components. The `man` subcommand was integrated as part of `rustup`'s ongoing development, reflecting the project's commitment to providing comprehensive and easily accessible documentation for its users. Its inclusion reinforces the command-line centric nature of Rust development, ensuring that official toolchain documentation is always just a simple command away.