The Rust package manager https://doc.rust-lang.org/cargo
Find a file
Arlo Siemsen ee0f0051a5
chore: Remove edition_lint_opts from Lint (#16762)
`edition_lint_opts` was originally added as a way for a `Lint` to have a
different level starting in a specific edition, which is something that
the [Edition-specific
lints](https://rustc-dev-guide.rust-lang.org/guides/editions.html#edition-specific-lints)
section in the `rustc-dev-guide` explicitly discourages:
> This should generally be used sparingly, as there are other options

Since the `rustc-dev-guide` discourages the use of Edition-specific
lints and no `Lint` currently uses `edition_lint_opts`, I decided to go
ahead and remove it.

Note: This removes an early return from `level_priority` when
`default_level` is `forbid`, but this shouldn't be a problem as `forbid`
should never be the `default` for a `Lint` or `LintGroup`. I added a
test to ensure this is always the case.
2026-03-19 04:56:59 +00:00
.cargo feat: Add a typos CI job 2025-11-12 10:39:43 -07:00
.github chore(deps): update cargo-semver-checks to v0.47.0 2026-03-08 17:37:14 +00:00
benches chore: Upgrade incompatible 2026-03-03 11:02:34 -06:00
ci chore(ci): Detect user changes to src/etc/man 2026-03-11 07:38:23 -05:00
crates remove debug printing of HTTP information in tests 2026-03-18 21:36:08 -05:00
credential Bump versions for msrv change 2026-03-06 06:24:36 -08:00
src chore: Remove edition_lint_opts from Lint (#16762) 2026-03-19 04:56:59 +00:00
tests refactor: split out several smaller changes to prepare for async http (#16763) 2026-03-19 04:40:54 +00:00
.git-blame-ignore-revs Ignore rustfmt 2024 commit 2025-07-05 19:51:10 -07:00
.gitignore Fix target entry in .gitignore 2024-04-29 07:39:04 +10:00
.ignore docs(report): move cargo report to its own subsection 2026-01-21 10:50:40 -05:00
build.rs refactor: Migrate some cases to expect/reason 2026-01-02 15:41:46 -06:00
Cargo.lock refactor(shell): Pull out term integration detection 2026-03-16 13:35:40 -05:00
Cargo.toml refactor(shell): Pull out term integration detection 2026-03-16 13:35:40 -05:00
CHANGELOG.md Fix changelog link 2025-02-04 06:11:14 -08:00
clippy.toml chore: Communicate motivation for AtomucU64 2023-11-16 12:34:02 -06:00
CODE_OF_CONDUCT.md Add CoC 2023-01-25 10:18:15 +00:00
CONTRIBUTING.md docs: remove review capacity notice 2023-10-18 13:24:09 -04:00
deny.toml Update all dependencies 2025-02-09 15:50:36 -08:00
LICENSE-APACHE HTTPS all the things 2019-01-30 15:34:37 -05:00
LICENSE-MIT Remove inaccurate (misattributed) copyright notices 2017-07-26 17:19:24 -07:00
LICENSE-THIRD-PARTY HTTPS all the things 2019-01-30 15:34:37 -05:00
publish.py chore(release): Publish build-rs on release 2025-06-27 08:37:34 -05:00
README.md docs(README): fix the link to the changelog in the Cargo book 2025-05-25 10:05:19 +00:00
rustfmt.toml Rustfmt 2024 2025-07-05 19:50:36 -07:00
triagebot.toml Enable triagebot new [view-all-comments-link] feature 2026-02-11 18:46:43 +01:00
typos.toml chore(deps): update crate-ci/typos action to v1.40.0 2025-12-01 01:01:50 +00:00
windows.manifest.xml Add a windows manifest file 2023-12-07 14:24:58 +00:00

Cargo

Cargo downloads your Rust projects dependencies and compiles your project.

To start using Cargo, learn more at The Cargo Book.

To start developing Cargo itself, read the Cargo Contributor Guide.

The Cargo binary distributed through with Rust is maintained by the Cargo team for use by the wider ecosystem. For all other uses of this crate (as a binary or library) this is maintained by the Cargo team, primarily for use by Cargo and not intended for external use (except as a transitive dependency). This crate may make major changes to its APIs.

Code Status

CI

Code documentation: https://doc.rust-lang.org/nightly/nightly-rustc/cargo/

Compiling from Source

Requirements

Cargo requires the following tools and packages to build:

Other requirements:

The following are optional based on your platform and needs.

  • pkg-config — This is used to help locate system packages, such as libssl headers/libraries. This may not be required in all cases, such as using vendored OpenSSL, or on Windows.

  • OpenSSL — Only needed on Unix-like systems and only if the vendored-openssl Cargo feature is not used.

    This requires the development headers, which can be obtained from the libssl-dev package on Ubuntu or openssl-devel with apk or yum or the openssl package from Homebrew on macOS.

    If using the vendored-openssl Cargo feature, then a static copy of OpenSSL will be built from source instead of using the system OpenSSL. This may require additional tools such as perl and make.

    On macOS, common installation directories from Homebrew, MacPorts, or pkgsrc will be checked. Otherwise it will fall back to pkg-config.

    On Windows, the system-provided Schannel will be used instead.

    LibreSSL is also supported.

Optional system libraries:

The build will automatically use vendored versions of the following libraries. However, if they are provided by the system and can be found with pkg-config, then the system libraries will be used instead:

  • libcurl — Used for network transfers.
  • libgit2 — Used for fetching git dependencies.
  • libssh2 — Used for SSH access to git repositories.
  • libz (AKA zlib) — Used by the above C libraries for data compression. (Rust code uses zlib-rs instead.)

It is recommended to use the vendored versions as they are the versions that are tested to work with Cargo.

Compiling

First, you'll want to check out this repository

git clone https://github.com/rust-lang/cargo.git
cd cargo

With cargo already installed, you can simply run:

cargo build --release

Adding new subcommands to Cargo

Cargo is designed to be extensible with new subcommands without having to modify Cargo itself. See the Wiki page for more details and a list of known community-developed subcommands.

Releases

Cargo releases coincide with Rust releases. High level release notes are available as part of Rust's release notes. Detailed release notes are available in the changelog.

Reporting issues

Found a bug? We'd love to know about it!

Please report all issues on the GitHub issue tracker.

Contributing

See the Cargo Contributor Guide for a complete introduction to contributing to Cargo.

License

Cargo is primarily distributed under the terms of both the MIT license and the Apache License (Version 2.0).

See LICENSE-APACHE and LICENSE-MIT for details.

Third party software

This product includes software developed by the OpenSSL Project for use in the OpenSSL Toolkit (https://www.openssl.org/).

In binary form, this product includes software that is licensed under the terms of the GNU General Public License, version 2, with a linking exception, which can be obtained from the upstream repository.

See LICENSE-THIRD-PARTY for details.