rust-lang/cargo
Developer ToolsRust's package manager, used to download dependencies and build Rust projects.
What Cargo does
Cargo is the official package manager for Rust. It downloads a project's dependencies and compiles the project, making it the standard entry point for building and managing Rust code. Most users get Cargo together with the Rust toolchain; the binary distributed with Rust is maintained by the Cargo team for the wider ecosystem README lines 1–19.
Cargo is extensible through third-party subcommands, so new commands can be added without modifying Cargo itself. A wiki page lists known community-developed subcommands README lines 74–82 and third-party subcommands.
This repository is mainly for developing Cargo itself. The crate is primarily maintained for Cargo's own use, and its APIs may change significantly for other uses README lines 1–19.
Quick start
To use Cargo as a Rust user, start with The Cargo Book, which covers installation, project setup, dependency management and common commands.
To build Cargo from source, first install cargo, rustc, a C compiler for your platform, and git. On Unix-like systems, OpenSSL development headers are also needed unless the vendored-openssl feature is used; Windows uses Schannel instead README lines 22–58. Then clone and build:
git clone https://github.com/rust-lang/cargo.git
cd cargo
cargo build --release
The build produces a release binary. Optional system libraries such as libcurl, libgit2, libssh2 and zlib are used when found via pkg-config; otherwise vendored versions are built, and the vendored versions are the tested configuration README lines 22–58.
Constraints
- Building from source requires an existing Rust toolchain plus a C compiler and
git; Cargo cannot bootstrap itself from nothing in this repository. - Unix-like builds need OpenSSL development headers unless
vendored-opensslis enabled; the vendored build may requireperlandmake. - Third-party subcommands extend Cargo through a separate mechanism and are not part of this repository.
- Cargo releases follow Rust releases; detailed changes are tracked in the changelog.
- The code is dual-licensed under MIT and Apache-2.0 README lines 107–113.
HotRepo's take
In the Rust-language daily list recorded on 2026-11-06, Cargo ranked 19th with 7 new stars that day, bringing it to 15,680 stars. A single snapshot of a long-established official tool is not a trend signal, but it does show continued everyday attention. The HN threads around Cargo are sparse: the 2024 “Cargo Script” post points to the unstable -Zscript single-file script feature, where dependencies can be declared inline in a shebang-based Rust file HN discussion and unstable feature docs. That is a useful signal of where Cargo's scripting workflow is heading, though it remains an unstable feature.
Written by AI from the project's README, updated . The project's own docs are the source of truth.