cargo-version
Display version information for Cargo
TLDR
Show Cargo version
$ cargo version
Show verbose version info$ cargo version --verbose
Short form$ cargo -V
Verbose short form$ cargo -Vv
SYNOPSIS
cargo version [options]
cargo -V [v]
DESCRIPTION
cargo version displays the version of Cargo along with build metadata. The default output shows the version number, git commit hash, and build date. With the `--verbose` flag, additional details are shown including the host triple, linked library versions (libgit2, libcurl, SSL), and operating system information.
This command is useful for diagnosing build issues, verifying toolchain installations, and including version information in CI/CD logs and bug reports. It operates entirely offline with no side effects.
PARAMETERS
-v, --verbose
Show additional build metadata--format-version n
Output format: 1 (legacy JSON), 2 (human-readable, default)
OUTPUT
Default
$ cargo 1.75.0 (1d8b05cdd 2023-11-20)
Verbose$ cargo 1.75.0 (1d8b05cdd 2023-11-20)
release: 1.75.0
commit-hash: 1d8b05cdd
commit-date: 2023-11-20
host: x86_64-unknown-linux-gnu
libgit2: 1.7.1
libcurl: 7.88.1
ssl: OpenSSL 3.0.11
os: Linux [kernel 6.1.0]
release: 1.75.0
commit-hash: 1d8b05cdd
commit-date: 2023-11-20
host: x86_64-unknown-linux-gnu
libgit2: 1.7.1
libcurl: 7.88.1
ssl: OpenSSL 3.0.11
os: Linux [kernel 6.1.0]
RELATED COMMANDS
rustc --version
Show Rust compiler versionrustup show
Show installed toolchains
CAVEATS
Operates offline with no side effects. Useful for CI/CD and build script checks.
