rustc
invocation failure if no errors are seen #14453matches_prerelease
semantic #14305open-namespaces
: Allow open namespaces in PackageIdSpec
s #14467--color
to rustdoc invocations. #14425[package]
and [workspace]
in Cargo.toml. #14261profile.*.debug
for the error message. #14413_
underscore #14380lockfile-path
: Added --lockfile-path
flag that allows specifying a path to the lockfile other than the default path <workspace_root>/Cargo.lock
. (docs) #14326 #14417 #14423 #14424path-bases
: Introduced a table of path “bases” in Cargo configuration files that can be used to prefix the paths of path dependencies and patch entries. (RFC 3529) (docs) #14360-Zpackage-workspace
: Enhanced the experience of cargo package --workspace
when there are dependencies between crates in the workspace. Crates in a workspace are no longer required to publish to actual registries. This is a step toward supporting cargo publish --workspace
. #13947 #14408 #14340OptVersionReq::Req
#14412edition2024
: Revert “fix: Ensure dep/feature activates the dependency on 2024”. #14295update-breaking
: Improved error message when update --breaking
has an invalid spec #14279update-breaking
: Donโt downgrade on prerelease VersionReq
when updating with --breaking
#14250-Zbuild-std
: remove hack on creating virtual std workspace #14358 #14370-Zmsrv-policy
: Adjust MSRV resolve config field name / values. The previous placeholder resolver.something-like-precedence
is now renamed to resolver.incompatible-rust-versions
. #14296-Zmsrv-policy
: : Report when incompatible-rust-version packages are selected #14401-Ztarget-applies-to-host
: Fixed passing of links-overrides with target-applies-to-host and an implicit target #14205-Ztarget-applies-to-host
: -Cmetadata
includes whether extra rustflags is same as host #14432-Ztrim-paths
: rustdoc supports trim-paths for diagnostics #14389Workspace
. #14397workspace.package
and workspace.dependencies
. #14400cargo-test-support
usability and documentation. #14266 #14268 #14269 #14270 #14272Rc
instead of Arc
for storing rustflags #14273--check-cfg
support #14302TomlPackage::new
, Default
for TomlWorkspace
#14271source_id::with*
#14318RUST_BACKTRACE
#14441gix
0.64.0 #14332rusqlite
0.32.0 #14334windows-sys
0.59 #14335package.license-file
and package.readme
pointing to non-existent files during packaging..cargo_vcs_info.json
is always included, even when --allow-dirty
is passed. #13960--release
/--debug
flag along with the --profile
flag. #13971 #13921lib.plugin
key support in Cargo.toml. Rust plugin support has been deprecated for four years and was removed in 1.75.0. #13902 #14038-Cmetadata
for rustc consistent across platforms. #14107edition
is unset, even when MSRV is unset. #14110du
on every git source load. #14252update-breaking
: Add --breaking
to cargo update
, allowing upgrading dependencies to breaking versions. docs #13979 #14047 #14049--artifact-dir
: Rename --out-dir
to --artifact-dir
. The --out-dir
flag is kept for compatibility and may be removed when the feature gets stabilized. #13809edition2024
: Ensure unused optional dependencies fire for shadowed dependencies. #14028edition2024
: Address problems with implicit -> explicit feature migration #14018-Zcargo-lints
: Add unknown_lints
to lints list. #14024-Zcargo-lints
: Add tooling to document lints. #14025-Zcargo-lints
: Keep lints updated and sorted. #14030-Zconfig-include
: Allow enabling config-include
feature in config. #14196-Zpublic-dependency
: remove some legacy public dependency code from the resolver #14090-Ztarget-applies-to-host
: Pass rustflags to artifacts built with implicit targets when using target-applies-to-host #13900 #14201--precise <prerelease>
. #14013CARGO_CFG_TARGET_FAMILY
is multi-valued. #14165CARGO_CFG_TARGET_ABI
#14164strip
section. #14146workspace.badges
field. #14042get_source_id
out of registry #14218CodeFix::apply_solution
and impl Clone
#14092PathSource
/RecursivePathSource
split #14169 #14231__CARGO_GITOXIDE_DISABLE_LIST_FILES
environment variable. #14036InternedString
in hot path #14211std::fs::absolute
instead of reimplementing it #14075-C strip
on MSVC. #14061unexpected_builtin_cfgs
lint in user_specific_cfgs
test #14153snapbox
. For the complete list of migration pull requests, see #14039gix
0.64.0 #14431๐ Stabilize -Zcheck-cfg
! This by default enables rustc's checking of conditional compilation at compile time, which verifies that the crate is correctly handling conditional compilation for different target platforms or features. Internally, cargo will be passing a new command line option --check-cfg
to all rustc and rustdoc invocations.
A new build script invocation cargo::rustc-check-cfg=CHECK_CFG
is added along with this stabilization, as a way to add custom cfgs to the list of expected cfg names and values.
If a build script is not an option for your package, Cargo provides a config [lints.rust.unexpected_cfgs.check-cfg]
to add known custom cfgs statically.
(RFC 3013) (docs) #13571 #13865 #13869 #13884 #13913 #13937 #13958
๐ cargo-update: Allows --precise
to specify a yanked version of a package, and will update the lockfile accordingly. #13974
[badges]
to inherit from [workspace.package.badges]
. This was considered a bug. Keep in mind that [badges]
is effectively deprecated. #13788-p
flag. #13818i32
rather than usize
as the “default integer” in library template. #13939[lints]
table. #13833write_atomic
. #13898libsecret
by its SONAME
, libsecret-1.so.0
. #13927-Zcargo-lints
: Don't always inherit workspace lints. #13812-Zcargo-lints
: Add a test to ensure cap-lints works. #13829-Zcargo-lints
: Error when unstable lints are specified but not enabled. #13805-Zcargo-lints
: Add cargo-lints to unstable docs. #13881-Zcargo-lints
: Refactor cargo lint tests. #13880-Zcargo-lints
: Remove ability to specify -
in lint name. #13837-Zscript
: Remove unstable rejected frontmatter syntax for cargo script. The only allowed frontmatter syntax now is ---
. #13861 #13893-Zbindeps
: Build only the specified artifact library when multiple types are available. #13842-Zmsrv-policy
: Treat unset MSRV as compatible. #13791-Zgit
/-Zgitoxide
: Default configuration to be obtained from both environment variables and Cargo configuration. #13687-Zpublic-dependency
: Don't lose ‘public’ when inheriting a dependency. #13836edition2024
: Disallow ignored default-features
when inheriting. #13839edition2024
: Validate crate-types/proc-macro for bin like other Cargo targets. #13841rustc-flags
in build script overrides. #13957resolver-tests
. #13977CARGO_MAKEFLAGS
env for plugins. #13872cargo
against beta channel. #13827git::use_the_cli
test truly locale independent. #13935match_exact
. #13879RecursivePathSource
out of PathSource
. #13993cargo add
respects package.rust-version
a.k.a. MSRV when adding new dependencies. The behavior can be overridden by specifying a version requirement, or passing the --ignore-rust-version
flag. (RFC 3537) #13608Locking
status message shows dependency changes on any command. For cargo update
, it also tells you if any dependency version is outdated. #13561 #13647 #13651 #13657 #13759 #13764RUSTC_WRAPPER
, RUSTC_WORKSPACE_WRAPPER
, and variables from the [env]
table now also apply to the initial rustc -vV
invocation Cargo uses for probing rustc information. #13659foo = { optional = true }
from version="*"
dependencies with a warning into errors. This behavior has been considered a bug from the beginning. #13775lib.name
is inferred from package.name
. This change aligns to the documented behavior. One caveat is that JSON messages emitted by Cargo, like via cargo metadata
or --message-format=json
, will start reporting underscore lib names. #12783gitoxide
for listing files. This improves the performance of build script and cargo doc
for computing cache freshness, as well as fixes some subtle bugs for cargo publish
. #13592 #13696 #13704 #13777-Zlints
being passed and no longer necessary. #13632workspace.dependencies
keys on virtual workspaces. #13664lints.rust.unexpected_cfgs.check-cfg
. #13925target.name
in Cargo.toml if the value can be inferred. #13606Cargo.toml
, including replacing \
with /
. #13729--doc
flag under โTarget Selectionโ. #13756--config net.git-fetch-with-cli=true
is respected. #13992 #13997--target
, the default debuginfo strip rule also applies. Note that on Windows MSVC Cargo no longer strips by default. #13618.cargo/{config,config.toml}
is a symlink to the other. #13793nounset
mode. #13686--target
was passed. #13560--package
cannot be found #13735--precise
to specify a pre-release version of a package (RFC 3493) (docs) #13626-Zcargo-lints
: Add a basic linting system for Cargo. This is still under development and not available for general use. #13621 #13635 #13797 #13740 #13801 #13852 #13853edition2024
: Add default Edition2024 to resolver v3 (MSRV-aware resolver). #13785edition2024
: Remove underscore field support in 2024. #13783 #13798 #13800 #13804edition2024
: Error on [project]
in Edition 2024 #13747-Zmsrv-policy
: Respect ‘--ignore-rust-version’ #13738-Zmsrv-policy
: Add --ignore-rust-version
to update/generate-lockfile #13741 #13742-Zmsrv-policy
: Put MSRV-aware resolver behind a config #13769-Zmsrv-policy
: Error, rather than panic, on rust-version ‘x’ #13771-Zmsrv-policy
: Fallback to ‘rustc -V’ for MSRV resolving. #13743-Zmsrv-policy
: Add v3 resolver for MSRV-aware resolving #13776-Zmsrv-policy
: Don't respect MSRV for non-local installs #13790-Zmsrv-policy
: Track when MSRV is explicitly set, either way #13732--locked
ensuring that Cargo uses dependency versions in lockfile #13665RUSTC_WORKSPACE_WRAPPER
and RUSTC_WRAPPER
. #13648[workspace]
section is allowed. #13753cargo-test-support
and cargo-test-macro
! They are designed for testing Cargo itself, so no guarantee on any stability across versions. The crates.io publish of this crate is the same as other members crates. They follow Rust's 6-week release process. #13418Cargo.toml
#13693-Zgc
flag is still unstable. This is only for Cargo to start data collection, so that when automatic gc is stabilized, it's less likely to see cache misses. #13492 #13467term.unicode
is added to control the behavior manually. docs #13337target.<triple>.rustdocflags
in Cargo configuration. docs #13197Generated
statuses without --verbose
. #13557--
for libtest arguments #13448.cargo/config
files. #13349package.rust-version
when generating new lockfiles. #12861User-Agent: cargo/1.2.3
header when communicating with remote registries. Previously it was cargo 1.2.3
, which didn't follow the HTTP specifications. #13548package.edition
field is missing in Cargo.toml. #13499 #13504 #13505 #13533Finished
status message. #13422package.rust-version.
, not just a random one. #13514workspace.members
if there is no existing workspace in Cargo.toml. #13391cargo add/rm/init/new
. #13402CARGO_TERM_COLOR
in ‘--list’ and ‘-Zhelp’. #13479CARGO_TERM_COLOR
. #13463--precise
to specify a yanked version of a package #13333-Zcheck-cfg
: Add docsrs
cfg as a well known --check-cfg
#13383-Zcheck-cfg
: Silently ignore cargo::rustc-check-cfg
to avoid MSRV annoyance when stabilizing -Zcheck-cfg
. #13438-Zmsrv-policy
: Fallback to rustc -v
when no MSRV is set #13516-Zscript
: Improve errors related to cargo script #13346-Zpanic-abort-tests
: applies to doctests too #13388-Zpublic-dependency
: supports enabling via the -Zpublic-dependency
flag. #13340 #13556 #13547-Zpublic-dependency
: test for packaging a public dependency #13536-Zrustdoc-map
: Add all unit's children recursively for doc.extern-map
option #13481 #13544edition2024
: Enable edition migration for 2024. #13429open-namespaces
: basic support for open namespaces (RFC 3243) (docs) #13591cargo-fetch
recursive link in --offline
man page. #13364--list
option description starting with uppercase #13344cargo::metadata=KEY=VALUE
. #13436version
field in [package]
is optional in Cargo.toml #13390package.documentation
from the โbefore publishingโ list. #13398gix
0.58.0 #13380git2
0.18.2 #13412jobserver
0.1.28 #13419supports-hyperlinks
3.0.0 #13511rusqlite
0.31.0 #13510cargo-hack
. #13523RustVersion::is_compatible_with
. #13537anstyle
API #13368 #13562Freshness::Dirty
#13361std::fs
away from on-disk index cache #13515pulldown-cmark
0.10.0 #13517Config
to GlobalContext
#13409 #13486 #13506sysroot_host_libdir
. #13468snapbox
0.5.0 #13441term-svg
feature. #13461 #13465 #13520nonzero_exit_code
test isn't affected by developers RUST_BACKTRACE
setting #13385--package
/-p
flag, cargo pkgid
, cargo metadata
, and JSON messages from --message-format=json
. #12914 #13202 #13311 #13298 #13322-Zhelp
console output #13269cargo::
. #12201 #13212strip = "debuginfo"
(when strip
is not set) to strip pre-existing debuginfo coming from the standard library, reducing the default size of release binaries considerably (from ~4.5 MiB down to ~450 KiB for helloworld on Linux x64). #13257rustc
style errors for manifest parsing. #13172Content-Type: application/json
only for requests with a body payload #13264OUT_DIR
for all units with build scripts #13204--precise
accepts arbitrary git revisions #13250-Zgit
: Implementation of shallow libgit2 fetches behind an unstable flag docs #13252--output-format
option to cargo rustdoc
, providing tools with a way to lean on rustdocโs experimental JSON format. docs #12252 #13284 #13325-Zcheck-cfg
: Rework --check-cfg
generation comment #13195-Zcheck-cfg
: Go back to passing an empty values()
when no features are declared #13316-Zprecise-pre-release
: the flag is added but not implemented yet. #13296 #13320-Zpublic-dependency
: support publish package with a public
field. #13245-Zpublic-dependency
: help text of --public
/--no-public
flags for cargo add
#13272-Zscript
: Add prefix-char frontmatter syntax support #13247-Zscript
: Add multiple experimental manifest syntaxes #13241-Ztrim-paths
: remap common prefix only #13210du
function uses mutex #13273--path
is the installation source not destination #13205cargo-util-schemas
! This contains low-level Cargo schema types, focusing on serde
and FromStr
for use in reading files and parsing command-lines. Any logic for getting final semantics from these will likely need other tools to process, like cargo metadata
. The crates.io publish of this crate is the same as other members crates. It follows Rust's 6-week release process. #13178 #13185 #13186 #13209 #13267gix
0.57.1. #13230cargo fix
#13224handlebars
5.0.0. #13168 #13249cargo.exe
for windows msvc. #13131cargo --list
. #12992--optional <dep>
would create a <dep> = "dep:<dep>"
feature. #13071git+
and path+
schemes.?branch=dev
or ?tag=1.69.0
.[lints]
in virtual workspaces as they are ignored and users likely meant [workspace.lints]
. This was an oversight in the initial implementation (e.g. a [dependencies]
produces the same error). #13155cargo new
. #13152rust-lang/rust
's omit-git-hash
option. #12968all-static
feature now includes vendored-libgit2
. #13134--quiet
being used with nested subcommands. #12959?
in the --package
flag if it's a valid pkgid spec. #13315 #13318target
directory if it's in the package root. #12944--account
argument to op signin
command. #12985 #12986-Zgc
flag enables garbage collection for deleting old, unused files in cargo's cache. That is, downloaded source files and registry index under the CARGO_HOME
directory. docs #12634 #12958 #12981 #13055CARGO_RUSTC_CURRENT_DIR
. This is a path that rustc is invoked from. docs #12996-Zcheck-cfg
: Include declared list of features in fingerprint for -Zcheck-cfg
. #13012-Zcheck-cfg
: Fix --check-cfg
invocations with zero features. #13011-Ztrim-paths
: reorder --remap-path-prefix
flags for -Zbuild-std
. #13065-Ztrim-paths
: explicitly remap current dir by using .
. #13114-Ztrim-paths
: exercise with real world debugger. #13091 #13118-Zpublic-dependency
: Limit exported-private-dependencies
lints to libraries. #13135-Zpublic-dependency
: Disallow workspace-inheriting of dependency public status. #13125-Zpublic-dependency
: Add --public
for cargo add
. #13046-Zpublic-dependency
: Remove unused public-deps error handling #13036-Zmsrv-policy
: Prefer MSRV, rather than ignore incompatible. #12950-Zmsrv-policy
: De-prioritize no-rust-version in MSRV resolver. #13066-Zrustdoc-scrape-examples
: Don't filter on workspace members when scraping doc examples. #13077CARGO_CFG_*
values. #13069[lints]
table only affects local development of the current package. #12976cargo search
can search in alternative registries. #12962rust-version
(MSRV) field. #13056rustfix
crate to the rust-lang/cargo
repository. #13005 #13042 #13047 #13048 #13050curl-sys
0.4.70, which corresponds to curl 8.4.0. #13147gix-index
0.27.1. #13148itertools
0.12.0. #13086rusqlite
0.30.0. #13087toml_edit
0.21.0. #13088windows-sys
0.52.0. #13089tracing
0.1.37 for being be compatible with rustc_log. #13239 #13242gix-config
. #13117 #13129 #13130-Zlints
table feature. #12178Cargo.toml
parsing code in preparation of extracting an official schema API. #12954 #12960 #12961 #12971 #13000 #13021 #13080 #13097 #13123 #13128 #13154 #13166IndexSummary
in query{_vec}
functions. #12970home
against beta/stable branches #13167optionals
tests #13108test_2018_feature
from the test. #13156package.version
field in Cargo.toml
is now optional and defaults to 0.0.0
. Packages without the package.version
field cannot be published. #12786--timings
and cargo doc
outputs are clickable on supported terminals, controllable through term.hyperlinks
config value. #12889-vv
. #12829Generated
status displaying the full path. #12859<crate>
to install is positional. #12841--test
flag is for Cargo targets, not test functions. #12915cargo search
when cargo-<command>
cannot be found. #12840--target
and --exclude
flags. #12805--out-dir
flag. #12755-z
flag suggestion for -Z
flag. #12788--path
flag. #12811-
. #12939Edition2024
unstable feature. docs #12771-Ztrim-paths
feature adds a new profile setting to control how paths are sanitized in the resulting binary. (RFC 3127) (docs) #12625 #12900 #12908-Zcheck-cfg
: Adjusted for new rustc syntax and behavior. #12845-Zcheck-cfg
: Remove outdated option to -Zcheck-cfg
warnings. #12884public-dependency
: Support public
dependency configuration with workspace deps. #12817strip
info. #12754NewCrate
struct. #12782--bench
is passed in unconditionally to bench harnesses. #12850--
in manpage. #12832AND
search terms in mdbook search and fixed broken links. #12812 #12813 #12814itertools
0.11.0. #12759cargo_metadata
0.18.0. #12758curl-sys
0.4.68, which corresponds to curl 8.4.0. #12808toml
0.8.2. #12760toml_edit
0.20.2. #12761gix
to 0.55.2 #12906custom_target::custom_bin_target
test on windows-gnu. #12763Cargo.toml
parsing code in preparation of extracting an official schema API. #12768 #12881 #12902 #12911 #12948PackageIDSpec
syntax #12938VersionPreferences
#12930SourceId::precise
field an Enum. #12849cargo-credential-*
dependencies by OS. #12949actions/checkout
action to v4 #12762[lints]
table has been stabilized, allowing you to configure reporting levels for rustc and other tool lints in Cargo.toml
. (RFC 3389) (docs) #12584 #12648credential-process
and registry-auth
have been stabilized. These features consolidate the way to authenticate with private registries. (RFC 2730) (RFC 3139) (docs) #12590 #12622 #12623 #12626 #12641 #12644 #12649 #12671 #12709auth-required
field in the registry index's config.json
, enabling authenticated sparse index, crate downloads, and search API.[registry]
and [registries]
tables.--keep-going
flag has been stabilized and is now available in each build command (except bench
and test
, which have --no-fail-fast
instead). (docs) #12568--dry-run
flag and summary line at the end for cargo clean
. #12638-n
for cli option --dry-run
. #12660target.'cfg(..)'.linker
. #12535--package
. #12591 #12614 #12806--doc
is mixed with -p
. #12637Cargo.lock
in VCS ignore files for libraries. #12382--aggressive
in favor of the new --recursive
. #12544-p/--package
can be used as a positional argument. #12545 #12586--git
when the package name looks like a URL. #12575--target
uses rustup but falls back to rustc. #12606--target
values. #12607--explain
. #12592serde-untagged
. #12574 #12581std::fs::metadata
. #12636--help
output. #12594cargo rustc --print --target
. #12743profile.release.package."*"
for cargo remove
. #12624-Zasymmetric-token
: Created dedicated unstable flag for asymmetric-token support. #12551-Zasymmetric-token
: Improved logout message for asymmetric tokens. #12587-Zmsrv-policy
: Very preliminary MSRV resolver support. #12560-Zscript
: Hack in code fence support. #12681-Zbindeps
: Support dependencies from registries. #12421Cargo.lock
into version control is now the default choice, even for libraries. Lockfile and CI integration documentations are also expanded. Policy docs, Lockfile docs, CI docs, #12382 #12630version
works for git
dependencies. #12270strip
entries in dev
and release
profiles. #12748curl-sys
0.4.66, which corresponds to curl 8.3.0. #12718gitoxide
0.54.1. #12731git2
0.18.0, which corresponds to libgit2 1.7.1. #12580cargo_metadata
0.17.0. #12758sleep()
calls. #12686{{command}}
for use in src/doc/man/includes #12570network
for networking messages. #12582with_stdout_unordered
. #12635termcolor
to anstream
. #12751Source
trait under cargo::sources
. #12527name
and alt_registry_key
into one enum. #12675network::retry
doc. #12583CARGO_LOG
internal logging. #12542cargo update --precise
in the same place #12629cargo run/bench/test
in extra verbose mode -vv
. #12498cargo::
in custom build scripts. This is a preparation for an upcoming change in build script invocations. #12332cargo login
no longer accept any token after the --
syntax. Arguments after --
are now reserved in the preparation of the new credential provider feature. This introduces a regression that overlooks the cargo login -- <token>
support in previous versions. #12499--help
easier to browse. #11905--nocapture
flag if cargo test
process is terminated via a signal. #12463--help
that cargo test --all-targets
excludes doctests. #12422cargo.toml
to Cargo.toml
on publish, and warn on other cases of Cargo.toml
. #12399~/.cargo/{git,registry}
. #12369cargo doc --open
crash on WSL2. #12373http.debug
for certain strings. #12468cargo remove
incorrectly removing used patches. #12454[registries]
table. #12439-Zcredential-process
has been reimplemented with a clearer way to communicate with different credential providers. Several built-in providers are also added to Cargo. docs #12334 #12396 #12424 #12440 #12461 #12469 #12483 #12499 #12507 #12512 #12518 #12521 #12526credential-process
to credential-provider
in Cargo configurations.libsecert
.registry-auth
to credential-process
.--keep-going
flag support from cargo test
and cargo bench
. #12478 #12492-Zscript
. #12349-Zscript
now errors out on unsupported commands โ publish
and package
. #12350panic_unwind
std feature with panic-unwind
. #12364-Zlints
: doctest extraction should respect [lints]
. #12501cargo metadata
are opaque strings. #12313rerun-if-env-changed
doesn't monitor the environment variables it set for crates and build script. #12482lto
setting passing -Clinker-plugin-lto
. #12407profile.strip
to configuration and environment variable docs. #12337 #12408.cargo/credential
file existence. #12479resolver = 2
used inside workspaces. #12388master
branch by default branch in documentation. #12435criterion
0.5.1. #12338curl-sys
0.4.65, which corresponds to curl 8.2.1. #12406indexmap
v2. #12368miow
0.6.0, which drops old versions of windows-sys
. #12453--workspace
. #12342xtask-bump-check
for respecting semver by adopting cargo-semver-checks
. #12395 #12513 #12508log
to tracing
. #12458 #12488--help
output in tests. #11912crates-io
: expose HTTP headers and Error
type. #12310cargo update
, caught CLI flags conflict between --aggressive
and --precise
in clap. #12428rust-lang/rust
. #12413 #12416 #12429 #12450 #12491 #12500-Zdoctest-in-workspace
by default. When running each documentation test, the working directory is set to the root directory of the package the test belongs to. docs #12221 #12288build.jobs
parallelism back to the default. #12222workspace.resolver
is not set. It is recommended to set the resolver version for workspaces explicitly. #10910LIBPATH
. #11968-C debuginfo=0
to rustc as it is the default value. #12022 #12205cargo install
failures. #12231rustup
override shorthand is put in a wrong position. #12226cargo clean
uses remove_dir_all
as a fallback to resolve race conditions. #11442[features]
table. #12191-Zscript
is an experimental feature to add unstable support for single-file packages in Cargo, so we can explore the design and resolve questions with an implementation to collect feedback on. (eRFC 3424) docs #12245 #12255 #12258 #12262 #12268 #12269 #12281 #12282 #12283 #12284 #12287 #12289 #12303 #12305 #12308cargo new
/cargo init
. #12174-Zjobserver-per-rustc
again. #12285.toml
file extension restriction for -Zconfig-include
. #12298-Znext-lockfile-bump
to prepare for the next lockfile bump. #12279 #12302Cargo.lock
conflicts in the Cargo FAQ. #12185cargo::sources
module. #12192 #12239 #12247Source
download functions. #12319main
by default. #12251gix
0.45 for multi-round pack negotiations. #12236curl-sys
0.4.63, which corresponds to curl 8.1.2. #12218openssl
0.10.55. #12300windows-sys
dependency. #12176-Z
flags. #12182 #12223 #12224OnceLock
for interning uses. #12217.clone
. #12213cargo-credential-gnome-secret
on non-Linux platforms. #12321workspace_default_members
to the output of cargo metadata
. #11978cargo new
/cargo init
. #12069rustup
. When Cargo detects it will run rustc
pointing a rustup proxy, it‘ll try bypassing the proxy and use the underlying binary directly. There are assumptions around the interaction with rustup and RUSTUP_TOOLCHAIN
. However, it’s not expected to affect normal users. #11917RUSTUP_HOME
and RUSTUP_TOOLCHAIN
in the [env]
configuration table. This is considered to be not a use case Cargo would like to support, since it will likely cause problems or lead to confusion. #12101 #12107--help
text is now wrapping for readability on narrow screens. #12013--help
text to clarify role of --bin
. #12157rust-version
is included in cargo publish
requests to registries. #12041cargo clippy --fix
. #11882[env]
to rust invocations for target info discovery. #12029-C debuginfo
not passed in some situation, leading to build cache miss. #12165cargo install
found packages with the same name. The ambiguity happened in a situation like a package depending on old versions of itself. #12015cargo package
checks for conflict files. #12135dep/feat
syntax not working when co-exist with dep:
syntax, and trying to enable features of an optional dependency. #12130cargo tree
not handling the output with -e no-proc-macro
correctly. #12044cargo package
on empty readme
or license-file
in Cargo.toml. #12036-Zgitoxide
feature now supports shallow clones and fetches for dependencies and registry indexes. docs #11840-Zlints
feature enables configuring lints rules in Cargo.toml docs #12148 #12168-Zbuild-std
breakage of missing features in nightly-2023-05-04
has been fixed in nightly-2023-05-05
. #12088-Zmsrv-policy
feature flag placeholder. #12043cargo add
now considers rust-version
when selecting packages with -Zmsrv-policy
. #12078#[non_exhaustive]
on existing items is a breaking change. #10877cargo yank
. #11862rust_version
in Index format. #12040msg
in owner-remove registry API response. #12068Source
and build script for cargo-the-library. #12133 #12153 #12159linux-raw-sys
0.3.2 #11998git2
0.17.1, which corresponds to libgit2 1.6.4. #12096windows-sys
0.48.0 #12021libc
0.2.144 #12014 #12098openssl-src
111.25.3+1.1.1t #12005home
0.5.5 #12037Win32_System_Console
feature since it is used. #12016openssl
only on non-Windows platforms. #11979cargo build-man
. #12048cargo stale-label
. #12051cargo unpublished
. #12039 #12045 #12085cargo logout
command for removing an API token from the registry locally. docs #11919 #11950--ignore-rust-version
flag to cargo install
. #11859CARGO_PKG_README
environment variable is now set to the path to the README file when compiling a crate. #11645sparse
protocol is now the default protocol for crates.io! (RFC 2789) (docs) #11791 #11783cargo login
and cargo logout
now uses the registry specified in registry.default
. This was an unintentional regression. #11949cargo update
accurately shows Downgrading
status when downgrading dependencies. #11839cargo publish
message when waiting for a publish complete. #11713cargo install
from a git repository but found multiple packages. #11835--charset
option of cargo tree
. #11785CARGO_CFG_
vars for configs defined both with and without value. #11790cargo add
. #11805patch
] involved in dependency resolution results in a conflict. #11770cargo new
generates the correct .hgignore
aligning semantics with other VCS ignore files. #11855-
or _
in their names. #11936 #11937-Zdirect-minimal-versions
. This behaves like -Zminimal-versions
but only for direct dependencies. (docs) #11688-Zgitoxide
which switches all git fetch
operation in Cargo to use gitoxide
crate. This is still an MVP but could improve the performance up to 2 times. (docs) #11448 #11800 #11822 #11830-Zjobserver-per-rustc
. Its rustc counterpart never got landed. #11764-C
that it appears before the command. #11947cargo test
, cargo bench
and cargo run
. #11901registries.name.index
configuration. #11880cargo-add
. #11826@
when mentioning pkgid format. #11956sha2
crate for SHA256 calculation. #11795 #11807base64
0.21.0. #11796curl-sys
0.4.61, which corresponds to curl 8.0.1. #11871proptest
1.1.0. #11886git2
0.17.0, which corresponds to libgit2 1.6.3. #11928clap
4.2. #11904cargo-deny
in Cargo its own CI pipeline. #11761derive
feature from serde
in cargo-platform
. #11915std::fs::canonicalize
with a more robust try_canonicalize
. #11866disallowed_methods
for std::env::var
and friends. #11828cargo fix
or cargo clippy --fix
when compilation warnings are auto-fixable. #11558cargo add
if you try to install a library crate. #11410CARGO_BIN_NAME
environment variable also for binary examples. #11705default-features
is set to false of a workspace dependency, and an inherited dependency of a member has default-features = true
, Cargo will enable default features of that dependency. #11409CARGO_HOME
in [env]
configuration table. Cargo itself doesn't pick up this value, but recursive calls to cargo would, which was not intended. #11644cargo add
now checks only the order of [dependencies]
without considering [dependencies.*]
. #11612jobserver
. #11767cargo install
now reports required features when no binary meets its requirements. #11647.dwp
DWARF package file next to the executable for debuggers to locate them. #11572rerun-if-changed
points to a directory whose mtime is not preserved by the filesystem. #11613[workspace.dependencies]
for [patch]
. This usage is not supposed to be supported. #11565 #11630cargo report
saving the same future-incompat reports multiple times. #11648.rs
as a file. #11678.cargo-ok
file being truncated wrongly, preventing from using a dependency. #11665 #11724-Zrustdoc-scrape-example
must fail with bad build script. #11694-C
flag for changing current dir before build starts. #10952CARGO_CRATE_NAME
and CARGO_PKG_NAME
. #11576publish.timeout
docs. #11652cargo::core::compiler
modules. #11669 #11703 #11711 #11758codegen-backend
. #11676cargo install
to the man pages #11763-F
flag as an alias for --features
in cargo add
. #11774cargo_new::NewProjectKind
as public. #11700build
to check
. #11725toml
v0.6 and toml_edit
v0.18 for TOML manipulations. #11618clap
v4.1.3. #11619winapi
with windows-sys
crate for Windows bindings. #11656url
crate for percent encoding instead of percent-encoding
. #11750---
is auto-converted into an em dash. (docs) #11646 #11715A-*
and Command-*
. #11664 #11679@revoked
. #11635home
crate is now a subcrate in rust-lang/cargo
repository. Welcome! #11359 #11481net.git-fetch-with-cli
enabled. #11579cargo build --verbose
tells you more about why it recompiles. #11407fcntl
. #11439 #11474cargo vendor
generates a different source replacement entry for each revision from the same git repository. #10690.cargo/credentials.toml
. If .cargo/credentials
exists, writes to it for backward compatibility reasons. #11533cargo package
and cargo publish
now respects workspace's Cargo.lock
. This is an expected behavior but previously got overlooked. #11477cargo vendor
failing on resolving git dependencies inherited from a workspace. #11414cargo install
can now correctly install root package when workspace.default-members
is specified. #11067--help
if there is no man page for a subcommand. #11473target.cfg(โฆ).rustflags
shouldn't erase build.rustdocflags
. #11323profile.split-debuginfo
options are now ignored, which previously made Cargo fail to compile on certain platforms. #11347 #11633auth-required: true
without -Z sparse-registry
#11661codegen-backend
and rustflags
in profiles in config file. #11562cargo clippy --fix
when warnings/errors could be fixed with clippy. #11399optional = true
. #11434Unit
s with and without artifact targets. #11478cargo metadata
supports artifact dependencies. #11550cargo remove
now cleans up the referenced dependency of the root workspace manifest, profile
, patch
, and replace
sections after a successful removal of a dependency. #11194 #11242 #11351cargo package
and cargo publish
now report total and compressed crate size after packaging. #11270$CARGO
if it's already set in the environment, and forwards the value when executing external subcommands and build scripts. #11285cargo update --precise
without a -p
flag. #11349cargo fix
on a git repo with uncommitted changes. #11400cargo tree -i <spec>
cannot find any package. #11377cargo new/init
and PATH
env separator is in the project path. #11318cargo add/remove
gets confused. #11186 #11375cargo init
but existing ignore files aren't UTF-8. #11321cargo install .
. #11401cargo clean
for removing fingerprints and build script artifacts of only the requested package #10621cargo install --index
not working when config registry.default
is set. #11302atty
to resolve potential soundness issue. #11420cargo fix
when some compilation warnings/errors can be auto-fixed. #10989 #11368rustdoc-scrape-examples
to be a target-level configuration. #10343 #11425 #11430 #11445wait-for-publish
to work with sparse registry. #11356 #11327 #11388sparse+
prefix in the SourceId
for sparse registries #11387 #11403registries.crates-io.protocol
. #11350cargo remove
command for removing dependencies from Cargo.toml
. docs #11059 #11099 #11193 #11204 #11227Accept-Encoding
header to registries. #11292--registry <NAME>
when performing an API operation.registry.token
).replace-with
key can reference the name of an alternative registry in the [registries]
table.cargo publish
now blocks until it sees the published package in the index. #11062 #11210 #11216 #11255cargo --config <file>
now takes priority over environment variables. This is a documented behaviour but the old implementation accidentally got it wrong. #11077target.cfg(โฆ).rustflags
more correctly and warns if that's not enough for convergence. #11114cargo add
now reports unknown features in a more discoverable manner. #11098cargo login
prompt receives empty input. #11145dep:
with /
. #11172package.publish
is false
in the manifest. #11280publish.timeout
behind -Zpublish-timeout
. docs #11230registry+sparse+
. #11177registries.crates-io.protocol
for controlling crates.io protocol. #11215sparse+
prefix for index.crates.io. #11247-Zsparse-registry
. #11283PATH
if it's already there. #11023rev
field. #10807std::thread::scope
instead of the crossbeam
crate for spawning scoped threads. #10977available_parallelism
instead of the num_cpus
crate for determining the default parallelism. #10969rust-version
requirement not satisfied. #10891cargo update
now warns if --precise
is given without --package
flag. This will become a hard error after a transition period. #10988 #11011cargo bench
and cargo test
now report a more precise test execution error right after a test fails. #11028cargo add
now tells you for which version the features are added. #11075workspace.package
and workspace.dependencies
for more details on how to define these common settings. #10859--crate-type
flag to cargo rustc
to override the crate type. #10838--target
flags to build for multiple targets at once, and the build.target
config option may now take an array of multiple targets. #10766--jobs
argument can now take a negative number to count backwards from the max CPUs. #10844cargo install --path
now supports path completion. #10798rev
field. #10079cargo add
will now update Cargo.lock
. #10902cargo vendor
now translates backslashes to forward slashes so that the settings should work across platforms. #10668workspace.default-members
setting now allows a value of "."
in a non-virtual workspace to refer to the root package. #10784os
output in cargo --version --verbose
now supports more platforms. #10802net.git-fetch-with-cli
and interrupting the clone process. #10829cargo add --offline
. #10817check-cfg
in config.toml
. #10799--config
CLI option to pass config options directly on the CLI. #10755CARGO_PKG_RUST_VERSION
environment variable is now set when compiling a crate if the manifest has the rust-version
field set. #10713publish=false
. #10701 #10767.json
target spec file instead of its path. This should help avoid rebuilds if the path changes. #10746update=none
strategy in .gitmodules
is now honored, and the submodule will not be fetched. #10717cargo new
now includes a slightly more realistic test structure that has use super::*;
in the test module. #10706cargo add
and cargo locate-project
#10810 #10811-p
being ignored with cargo publish
in the root of a virtual workspace. Some additional checks were also added to generate an error if multiple packages were selected (previously it would pick the first one). #10677cargo test
when using JSON output. #10691-Zcheck-cfg=output
to support build-scripts declaring their supported set of cfg
values with cargo:rustc-check-cfg
. #10539-Z sparse-registry
now uses https://index.crates.io/ when accessing crates-io. #10725.workspace
key in cargo add
for workspace inheritance. #10705/
. #10698cargo add
and workspace inheritance of the default-features
key. #10685cargo add
command for adding dependencies to Cargo.toml
from the command-line. docs #10472 #10577 #10578name@version
syntax in addition to the previous name:version
to align with the behavior in cargo add
and other tools. cargo install
and cargo yank
also now support this syntax so the version does not need to passed as a separate flag. #10582 #10650 #10597-F
as an alias of --features
. #10576git
and registry
directories in Cargo's home directory (usually ~/.cargo
) are now marked as cache directories so that they are not included in backups or content indexing (on Windows). #10553--version
flag to cargo yank
to replace the --vers
flag to be consistent with cargo install
. #10575@
argfile support, which will use “response files” if the command-line to rustc
exceeds the operating system's limit. #10546cargo clean
now has a progress bar (if it takes longer than half a second). #10236cargo install
no longer generates an error if no binaries were found to install (such as missing required features). #10508cargo test
now passes --target
to rustdoc
if the specified target is the same as the host target. #10594cargo doc
now automatically passes -Arustdoc::private-intra-doc-links
when documenting a binary (which automatically includes --document-private-items
). The private-intra-doc-links
lint is only relevant when not documenting private items, which doesn't apply to binaries. #10142cargo --version
output is now fixed to 9 characters. Previously the length was inconsistent between different platforms. #10579Cargo.toml.orig
file will now result in an error. The filename would otherwise conflict with the automatically-generated file. #10551build.dep-info-basedir
configuration setting now properly supports the use of ..
in the path to refer to a parent directory. #10281cargo fetch
now works with -Zbuild-std
to fetch the standard library's dependencies. #10129-Zcheck-cfg
which adds various forms of validating cfg
expressions for unknown names and values. docs #10486 #10566--config
CLI option no longer allows setting a registry token. #10580-Z rustdoc-scrape-examples
. #10549 #10533cargo test --no-run
will now display the path to the test executables. #10346cargo tree --duplicates
no longer reports dependencies that are shared between the host and the target as duplicates. #10466cargo vendor
no longer allows multiple values for --sync
, you must pass multiple --sync
flags instead. #10448proc_macro
and proc-macro
) #10316available_parallelism
instead of the num_cpus
crate for determining the default parallelism. #10427cargo search
terms are now highlighted. #10425hg
are now added after --
to avoid conflict with VCS flags. #10483http.timeout
configuration value to actually work. #10456cargo rustc --crate-type
not working in some situations. #10388-Z check-cfg-features
to enable compile-time checking of features #10408-Z bindeps
to support binary artifact dependencies (RFC-3028) #9992-Z multitarget
is now supported in the build.target
config value with an array. #10473--keep-going
flag which will continue compilation even if one crate fails to compile. #10383[target.'cfg(<target>)'.dependencies]
#10433-Z target-applies-to-host
) #10395-Z check-cfg-features
support for rustdoc #10428dep:
prefix in the [features]
table to refer to an optional dependency. This allows creating feature names with the same name as a dependency, and allows for “hiding” optional dependencies so that they do not implicitly expose a feature name. docs #10269dep-name?/feature-name
syntax to the [features]
table to only enable the feature feature-name
if the optional dependency dep-name
is already enabled by some other feature. docs #10269--timings
option to generate an HTML report about build timing, concurrency, and CPU use. docs #10245"v"
and "features2"
fields to the registry index. The "v"
field provides a method for compatibility with future changes to the index. docs #10269cargo clippy
#10347cargo report
#10295rustc-link-arg-tests
, rustc-link-arg-examples
, and rustc-link-arg-benches
. docs #10274build.pipelining
config option is now deprecated, pipelining will now always be enabled. #10258cargo new
will now generate a .gitignore
which only ignores Cargo.lock
in the root of the repo, instead of any directory. #10379--features
flag is now honored when used with the --all-features
flag, which allows enabling features from other packages. #10337cargo add
and other future enhancements. #10086dylib
and cdylib
is now an error, as this combination is not supported. #10243cargo --list
now includes the help
command. #10300cargo doc
on examples with dev-dependencies. #10341cargo install --path
for a path that is relative to a directory outside of the workspace in the current directory. #10335cargo test TEST_FILTER
should no longer build binaries that are explicitly disabled with test = false
. #10305term.verbose
without term.quiet
, and vice versa. #10429 #10436rustflags
option to a profile definition. #10217--config
to only support dotted keys. #10176rustflags
not being gated in profile overrides. #10411 #10413strip
option can now be specified in a profile to specify the behavior for removing symbols and debug information from binaries. docs #10088 #10376rustc
may cause a package or any of its dependencies to stop building. docs #10165term.quiet
configuration option to enable the --quiet
behavior from a config file. docs #10152-r
CLI option as an alias for --release
. #10133cargo help <alias>
will now show the target of the alias. #10193--host
CLI option. #10145 #10327rustc
. #10178doc=false
setting is honored in the [lib]
definition of a dependency. #10201 #10324"executable"
field in the JSON option was incorrectly including the path to index.html
when documenting a binary. It is now null. #10171--crate-type
flag to cargo rustc
. #10093rust_version
field to package data in cargo metadata
. #9967--message-format
option to cargo install
. #10107cargo tree
entering an infinite loop with cyclical dev-dependencies. Fixed an edge case where the resolver would fail to handle a cyclical dev-dependency with a feature. #10103cargo clean -p
when the directory path contains glob characters. #10072cargo
which could panic when downloading a crate when the server has a redirect with a non-empty body. #10048examples
directory to be included in the documentation. docs #9525 #10037 #10017cargo report future-incompatibilities
to check stdout if it supports color. #10024test
and bench
profiles to inherit their settings from dev
and release
, and Cargo will now only use a single profile during a given command instead of using different profiles for dependencies and cargo-targets. docs #9943rev
option for a git dependency now supports git references that start with refs/
. An example where this can be used is to depend on a pull request from a service like GitHub before it is merged. #9859path_in_vcs
field to the .cargo_vcs_info.json
file. docs #9866RUSTFLAGS
is no longer set for build scripts. This change was made in 1.55, but the release notes did not highlight this change. Build scripts should use CARGO_ENCODED_RUSTFLAGS
instead. See the documentation for more details.cargo version
command now includes some extra information. #9968cargo update --precise
now allows specifying a version without semver metadata (stuff after +
in the version number). #9945--example
names. #9939CARGO_LOG
) that may leak tokens. #9873cargo fix
will now avoid writing fixes to the global registry cache. #9938-Z help
CLI option when used with a shorthand alias (b/c/r/d). #9933rust-version
field to Cargo.toml
to specify the minimum supported Rust version, and the --ignore-rust-version
command line option to override it. #9732[env]
table to config files to specify environment variables to set. docs #9411[patch]
tables may now be specified in config files. docs #9839cargo doc
now supports the --example
and --examples
flags. #9808-p
flag for cargo publish
to publish a specific package in a workspace. cargo package
also now supports -p
and --workspace
. #9559{sha256-checksum}
placeholder for URLs in a registry config.json
. docs #9801-q
flag to show terse test output. #9730features
used in a [replace]
table now issues a warning, as they are ignored. #9681wasm32-unknown-emscripten
executables are built without a hash in the filename. Previously it was all wasm32
targets. Additionally, all apple
binaries are now built with a hash in the filename. This allows multiple copies to be cached at once, and matches the behavior on other platforms (except msvc
). #9653cargo new
now generates an example that doesn't generate a warning with clippy. #9796cargo fix --edition
now only applies edition-specific lints. #9846cargo fix
now has more debug logging available with the CARGO_LOG
environment variable. #9831cargo fix --edition
to emit a warning when on the latest stable edition when running on stable instead of generating an error. #9792cargo install
will now determine all of the packages to install before starting the installation, which should help with reporting errors without partially installing. #9793cargo fix --edition
now includes differences for dev-dependencies. #9803cargo fix
will now show better diagnostics for abnormal errors from rustc
. #9799cargo --list
are now deduplicated. #9773cargo --list
. #9764cargo
recursively from proc-macros while running cargo fix
. #9818[future-incompat-report]
config section. #9774different-binary-name
feature to support specifying a non-rust-identifier for a binary name. docs #9627cargo metadata
now includes the "default_run"
field from the manifest. #9550RUSTC_WRAPPER
, RUSTC_WORKSPACE_WRAPPER
, CARGO_ENCODED_RUSTFLAGS
. RUSTFLAGS
is no longer set for build scripts; they should use CARGO_ENCODED_RUSTFLAGS
instead. docs #9601cargo d
as an alias for cargo doc
. #9680{lib}
to the cargo tree --format
option to display the library name of a package. #9663members_mut
method to the Workspace
API. #9547--all-targets
, --bins
, --tests
, --examples
, or --benches
flags, a warning is now displayed to inform you that there were no matching targets. #9549cargo init
detects whether or not existing source files represent a binary or library has been changed to respect the command-line flags instead of trying to guess which type it is. #9522cargo test
which builds multiple copies of the same code in parallel. This also updates the warning summary to provide more context. #9675branch
, tag
, rev
) on a non-git dependency are now an error. Additionally, specifying both git
and path
is now an error. #9689[patch]
table entries of dependencies when possible. #9639features
used in a [patch]
table now issues a warning, as they are ignored. #9666target
directory is now excluded from content indexing on Windows. #9635Cargo.toml
is not found, the error message now detects if it was misnamed with a lowercase c
to suggest the correct form. #9607diesel
with the new resolver displays a compatibility notice. #9602opener
dependency, which handles opening a web browser, which includes several changes, such as new behavior when run on WSL, and using the system xdg-open
on Linux. #9583--
#9561cargo fix
now supports rustc's suggestions with multiple spans. #9567cargo fix
now fixes each target serially instead of in parallel to avoid problems with fixing the same file concurrently. #9677linker
config value now trigger a rebuild. #9647--allow-dirty
flag with cargo publish
or cargo package
. #9645cargo fix --edition
for 2021. #9588cargo fix --edition
on the 2021 edition. #9694cargo doc --open
with doc.extern-map
. #9531[env]
environment variables are not allowed to set vars set by Cargo. #9579--prune
option for cargo tree
to limit what is displayed. #9520--depth
option for cargo tree
to limit what is displayed. #9499cargo tree -e no-proc-macro
to hide procedural macro dependencies. #9488doc.browser
config option to set which browser to open with cargo doc --open
. #9473CARGO_TARGET_TMPDIR
environment variable set for integration tests & benches. This provides a temporary or “scratch” directory in the target
directory for tests and benches to use. #9375--features
CLI flags now provide typo suggestions with the new feature resolver. #9420.crate
published packages has changed slightly to avoid mtime values of 0. This was causing problems with lldb which refused to read those files. #9517cargo package
. #9478cargo new
with fossil now places the ignore settings in the new repository instead of using fossil settings
to set them globally. This also includes several other cleanups to make it more consistent with other VCS configurations. #9469rustc-cdylib-link-arg
applying transitively displays a warning that this was not intended, and may be an error in the future. #9563package.exclude
in Cargo.toml
using inverted exclusions (!somefile
) when not in a git repository or when vendoring a dependency. #9186rerun-if-changed
paths to be absolute paths. #9421110.0.0
and 110.0.0+1.1.0f
). #9476cargo install
with a semver metadata version. #9467report
subcommand, and changed cargo describe-future-incompatibilitie
to cargo report future-incompatibilities
. #9438[host]
table to the config files to be able to set build flags for host target. Also added target-applies-to-host
to control how the [target]
tables behave. #9322rustc-link-arg-*
instructions to return an error if the target doesn't exist. #9523cargo:rustc-link-arg-bin
instruction for build scripts. #9486HEAD
branch is not “master”. This also includes a switch to the version 3 Cargo.lock
format which can handle default branches correctly. #9133 #9397 #9384 #9392unpacked
split-debuginfo. #9298authors
field is no longer included in Cargo.toml
for new projects. #9282cargo update
may now work with the --offline
flag. #9279cargo doc
will now erase the doc
directory when switching between different toolchain versions. There are shared, unversioned files (such as the search index) that can become broken when using different versions. #8640 #9404cargo doc
detecting if the documentation needs to be rebuilt when changing some settings such as features. #9419cargo doc
now deletes the output directory for the package before running rustdoc to clear out any stale files. #9419-C metadata
value to always include all information for all builds. Previously, in some situations, the hash only included the package name and version. This fixes some issues, such as incremental builds with split-debuginfo on macOS corrupting the incremental cache in some cases. #9418man
is in PATH
. #9378rustc
cache is now aware of RUSTC_WRAPPER
and RUSTC_WORKSPACE_WRAPPER
. #9348CARGO
environment variable in the rebuild fingerprint if the code uses env!("CARGO")
. #9363--future-incompat-report
had nothing to report. #9263-Z
and cargo-features
) now provides more information. #9290Cargo.toml
. docs #9030-Z help
now displays all the -Z
options. #9369-Zallow-features
to specify which nightly features are allowed to be used. #9283cargo config
subcommand. #9302RUSTC_BOOTSTRAP
on stable. #9181 #9385CARGO_TARGET_DIR
is an empty string. #8939--message-format
flag into the test so that the “short” format can now be used for doc tests. #9128cargo test
now prints a clearer indicator of which target is currently running. #9195CARGO_TARGET_<TRIPLE>
environment variable will now issue a warning if it is using lowercase letters. #9169Cargo.toml
. #9300 #9304-p
flag. #9188lto=off
is set. #9182strip
profile option now supports true
and false
values. #9153cargo fix --edition
now displays a report when switching to 2021 if the new resolver changes features. #9268[patch]
table support in .cargo/config
files. #9204cargo describe-future-incompatibilities
for generating a report on dependencies that contain future-incompatible warnings. #8825cargo fix --edition
now supports 2021. #9184--print
flag to cargo rustc
to pass along to rustc
to display information from rustc. #9002-Zdoctest-in-workspace
for changing the directory where doctests are run versus where they are compiled. #9105[env]
section in .cargo/config.toml
to set environment variables when running cargo. #9175features2
field to the index. #9161split-debuginfo
profile option. docs #9112path
field to cargo metadata
for the package dependencies list to show the path for “path” dependencies. #8994resolver = "2"
option. See the CLI and resolver 2 CLI options for the new CLI behavior. And, finally, see RFC 2957 for a detailed look at what has changed. #8997cargo install --locked
now emits a warning if Cargo.lock
is not found. #9108cargo vendor
#8937 #9131 #9132cargo test
and cargo run
when the build script runs multiple times during the same build session. #9122cargo doc
and the new feature resolver. This also introduces some heuristics to try to avoid path collisions with rustdoc
by only documenting one variant of a package if there are multiple (such as multiple versions, or the same package shared for host and target platforms). #9077links
environment variables (DEP_*
) not showing up for testing packages in some cases. #9065resolver="2"
. #9059http.proxy
setting in ~/.gitconfig
. #8986cargo doc
when there are colliding output filenames in a workspace. #9276 #9277cargo install
from exiting with success if one of several packages did not install successfully. #9185 #9196publish-lockfile
unstable feature, it was stabilized without the need for an explicit flag 1.5 years ago. #9092-Z
flag, or specified with cargo-features
in Cargo.toml
). #9092rust-version
field in project metadata. #8037doc
field to cargo metadata
, which indicates if a target is documented. #8869RUSTC_WORKSPACE_WRAPPER
, an alternate RUSTC wrapper that only runs for the local workspace packages, and caches its artifacts independently of non-wrapped builds. #8976--workspace
to cargo update
to update only the workspace members, and not their dependencies. This is particularly useful if you update the version in Cargo.toml
and want to update Cargo.lock
without running any other commands. #8725.crate
files uploaded to a registry are now built with reproducible settings, so that the same .crate
file created on different machines should be identical. #8864branch
, tag
, or rev
are now rejected. #8984rerun-if-changed
build script directive can now point to a directory, in which case Cargo will check if any file in that directory changes. #8973cargo new
will no longer fail, and instead create an empty authors list. #8912cargo new
will now support includeIf
directives in .gitconfig
to match the correct directory when determining the username and email address. #8886cargo metadata
and cargo tree
to only download packages for the requested target. #8987links
field. #8969cargo publish
failing on some filesystems, particularly 9p on WSL2. #8950resolver="1"
to specify the original feature resolution behavior. #8857-Z extra-link-arg
which adds the cargo:rustc-link-arg-bins
and cargo:rustc-link-arg
build script options. docs #8441cargo logout
. (RFC 2730) (docs) #8934-Zbuild-std
and no roots. #8942homepage
and documentation
fields to cargo metadata
. #8744CARGO_PRIMARY_PACKAGE
environment variable which is set when running rustc
if the package is one of the “root” packages selected on the command line. #8758-p 'serde*'
or --test '*'
). #8752cargo build
and cargo test
in some circumstances. #8755cargo tree
now displays (proc-macro)
next to proc-macro packages. #8765_
, -
, and +
to accommodate future syntax changes. This is still a superset of the allowed syntax on crates.io, which requires ASCII. This is intended to be changed to an error in the future. #8814-p
without a value will now print a list of workspace package names. #8808cargo metadata
for git dependencies that explicitly specify branch="master"
. #8824.cargo-ok
file. #8835cargo doc -Zfeatures=itarget
in some situations. #8777dep:serde
. docs #8799dep_name?/feat_name
, which will enable a feature for a dependency without also enabling the dependency. #8818term.progress
configuration option to control when and how the progress bar is displayed. docs #8165--message-format plain
option to cargo locate-project
to display the project location without JSON to make it easier to use in a script. #8707--workspace
option to cargo locate-project
to display the path to the workspace manifest. #8712--target
completion will now complete with the built-in rustc targets. #8740cargo new
creating a fossil repository to properly ignore the target
directory. #8671cargo install
of a remote package. #8681cargo install
so that it will ignore the [unstable]
table in local config files. #8656cargo test
on a proc-macro with the new feature resolver under a specific combination of circumstances. #8742cargo doc
will now include the package's version in the left sidebar. #8509test
field to cargo metadata
targets. #8478cargo help
command (such as cargo help build
). #8456 #8577.gitignore
when it is modified have been tweaked to add some spacing. #8476cargo metadata
output should now be sorted to be deterministic. #8489opt-level=0
and the default codegen units, even in release mode. #8500workspace.default-members
is now filtered by workspace.exclude
. #8485workspace.members
globs now ignore non-directory paths. #8511core.autocrlf
git configuration value to ensure they behave consistently across platforms, particularly when vendoring git dependencies on Windows. #8523Cargo.lock
needs to be updated, then it will be automatically transitioned to the new V2 format. This format removes the [metadata]
table, and should be easier to merge changes in source control systems. This format was introduced in 1.38, and made the default for new projects in 1.41. #8554branch
and one with branch="master"
. Dependencies should all use one form or the other. #8522required-features
entry lists a feature that does not exist. #7950cargo --list
. #8542cargo install
with a specific version that has been yanked will now display an error message that it has been yanked, instead of “could not find”. #8565cargo publish
with a package that has the publish
field set to a single registry, and no --registry
flag has been given, will now publish to that registry instead of generating an error. #8571rerun-if-changed
directive, then that build script was being rebuilt when it shouldn't. #8497CARGO_TARGET_{triplet}_RUNNER
environment variable will now correctly override the config file instead of trying to merge the commands. #8629-Z terminal-width
which tells rustc
the width of the terminal so that it can format diagnostics better. docs #8427-Z
unstable flags in config files via the [unstable]
table. docs #8393-Z build-std-features
flag to set features for the standard library. docs #8490dl
key in config.json
of a registry index now supports the replacement markers {prefix}
and {lowerprefix}
to allow spreading crates across directories similar to how the index itself is structured. docs #8267readme
is not specified in Cargo.toml
, it is now automatically inferred from the existence of a file named README
, README.md
, or README.txt
. This can be suppressed by setting readme = false
. #8277cargo install
now supports the --index
flag to install directly from an index. #8344metadata
table to the workspace
definition in Cargo.toml
. This can be used for arbitrary data similar to the package.metadata
table. #8323--target-dir
flag to cargo install
to set the target directory. #8391env!
or option_env!
macros are now automatically detected to trigger a rebuild. #8421target
directory now includes the CACHEDIR.TAG
file which is used by some tools to exclude the directory from backups. #8378+toolchain
syntax. #8455#
fragment in the URL. This was potentially confusing because Cargo itself displays git URLs with this syntax, but it does not have any meaning outside of the Cargo.lock
file, and would not work properly. #8297.crate
files are now generated with GNU tar format instead of UStar, which supports longer file names. #8453Cargo.lock
failed once, but then subsequent runs allowed it proceed. #8274.dll
extension. Some custom JSON spec targets may change the extension. #8310pkg/feature
syntax, and pkg
is an optional dependency, but also a dev-dependency, and the dev-dependency appears before the optional normal dependency in the registry summary, then the optional dependency would not get activated. #8395clean -p
deleting the build directory if there is a test named build
. #8398--document-private-items
flag for rustdoc would override any flags passed to the cargo rustdoc
command. #8449-Zrustdoc-map
feature which provides external mappings for rustdoc (such as https://docs.rs/ links). docs #8287Cargo.toml
with an underscore (like proc_macro = true
). #8319-Clinker
with -Zdoctest-xcompile
. #8359strip
profile field in config files. #8454Changed official documentation to recommend .cargo/config.toml
filenames (with the .toml
extension). .toml
extension support was added in 1.39. #8121
The registry.index
config value is no longer allowed (it has been deprecated for 4 years). #7973
An error is generated if both --index
and --registry
are passed (previously --index
was silently ignored). #7973
The registry.token
config value is no longer used with the --index
flag. This is intended to avoid potentially leaking the crates.io token to another registry. #7973
Added a warning if registry.token
is used with source replacement. It is intended this will be an error in future versions. #7973
Windows GNU targets now copy .dll.a
import library files for DLL crate types to the output directory. #8141
Dylibs for all dependencies are now unconditionally copied to the output directory. Some obscure scenarios can cause an old dylib to be referenced between builds, and this ensures that all the latest copies are used. #8139
package.exclude
can now match directory names. If a directory is specified, the entire directory will be excluded, and Cargo will not attempt to inspect it further. Previously Cargo would try to check every file in the directory which could cause problems if the directory contained unreadable files. #8095
When packaging with cargo publish
or cargo package
, Cargo can use git to guide its decision on which files to include. Previously this git-based logic required a Cargo.toml
file to exist at the root of the repository. This is no longer required, so Cargo will now use git-based guidance even if there is not a Cargo.toml
in the root of the repository. #8095
While unpacking a crate on Windows, if it fails to write a file because the file is a reserved Windows filename (like “aux.rs”), Cargo will display an extra message to explain why it failed. #8136
Failures to set mtime on files are now ignored. Some filesystems did not support this. #8185
Certain classes of git errors will now recommend enabling net.git-fetch-with-cli
. #8166
When doing an LTO build, Cargo will now instruct rustc not to perform codegen when possible. This may result in a faster build and use less disk space. Additionally, for non-LTO builds, Cargo will instruct rustc to not embed LLVM bitcode in libraries, which should decrease their size. #8192 #8226 #8254
The implementation for cargo clean -p
has been rewritten so that it can more accurately remove the files for a specific package. #8210
The way Cargo computes the outputs from a build has been rewritten to be more complete and accurate. Newly tracked files will be displayed in JSON messages, and may be uplifted to the output directory in some cases. Some of the changes from this are:
.exp
export files on Windows MSVC dynamic libraries are now tracked.There are a variety of other changes as a consequence of this:
foo_bar.exe
and foo-bar.exe
). Previously Cargo just renamed the file instead of hard-linking it.Cargo attempts to scrub any secrets from the debug log for HTTP debugging. #8222
Context has been added to many of Cargo's filesystem operations, so that error messages now provide more information, such as the path that caused the problem. #8232
Several commands now ignore the error if stdout or stderr is closed while it is running. For example cargo install --list | grep -q cargo-fuzz
would previously sometimes panic because grep -q
may close stdout before the command finishes. Regular builds continue to fail if stdout or stderr is closed, matching the behavior of many other build systems. #8236
If cargo install
is given an exact version, like --version=1.2.3
, it will now avoid updating the index if that version is already installed, and exit quickly indicating it is already installed. #8022
Changes to the [patch]
section will now attempt to automatically update Cargo.lock
to the new version. It should now also provide better error messages for the rare cases where it is unable to automatically update. #8248
.pdb
files to the output directory when the filename contained dashes. #8123cargo update
with an unused [patch]
so that it does not get stuck and refuse to update. #8243--target
to rustdoc
when using JSON spec targets. #8094-Cembed-bitcode=no
renamed to -Cbitcode-in-rlib=no
#8134resolver
field to Cargo.toml
to opt-in to the new feature resolver. #8129-Zbuild-std
no longer treats std dependencies as “local”. This means that it won't use incremental compilation for those dependencies, removes them from dep-info files, and caps lints at “allow”. #8177-Zmultitarget
which allows multiple --target
flags to build the same thing for multiple targets at once. docs #8167strip
option to the profile to remove symbols and debug information. docs #8246cargo tree --target=all -Zfeatures=all
. #8269cargo tree
command. docs #8062nul
, con
, aux
, prn
, etc.). #7959"build-finished"
JSON message when compilation is complete so that tools can detect when they can stop listening for JSON messages with commands like cargo run
or cargo test
. #8069-
. #7959cargo new
and init
will warn or reject additional package names (reserved Windows names, reserved Cargo directories, non-ASCII names, conflicting std names like core
, etc.). #7959target/debug/
). This ensures tools will have access to debug symbols and execute tests in the same way as Cargo. Tools should use JSON messages to discover the path to the executable. #7965.crate
file. This reverses the change made in 1.40 where the mtime was not preserved. #7935git-checkout
subcommand. #8040rustc
now share the same filenames. This means that changing nightly versions will not leave stale files in the build directory. #8073cargo package --list
to succeed, even if there are other validation errors (such as Cargo.lock
generation problem, or missing dependencies). #8175 #8215profile.dev
was not loaded from a config file with cargo test
when the dev
profile was not defined in Cargo.toml
. #8012dep_name/feature_name
syntax in required-features
correctly. #8020cargo clean -p
if the package has a build script. #8216RUSTC_WORKSPACE_WRAPPER
environment variable, which provides a way to wrap rustc
for workspace members only, and affects the filename hash so that artifacts produced by the wrapper are cached separately. This usage can be seen on nightly clippy with cargo clippy -Zunstable-options
. #7533--unit-graph
CLI option to display Cargo's internal dependency graph as JSON. #7977-Zbuild_dep
to -Zhost_dep
, and added proc-macros to the feature decoupling logic. #8003 #8028--crate-version
is not automatically passed when the flag is found in RUSTDOCFLAGS
. #8014-Zfeatures=dev_dep
and check --profile=test
. #8027-Zfeatures=itarget
with certain host dependencies. #8048-Cembed-bitcode=no
, which provides a performance boost and disk-space usage reduction for non-LTO builds. #8066-Zpackage-features
has been extended with several changes intended to make it easier to select features on the command-line in a workspace. #8074CARGO_BIN_EXE_<name>
environment variable when building integration tests. This variable contains the path to any [[bin]]
targets in the package. Integration tests should use the env!
macro to determine the path to a binary to execute. docs #7697cargo install --git
now honors workspaces in a git repository. This allows workspace settings, like [patch]
, [replace]
, or [profile]
to be used. #7768cargo new
will now run rustfmt
on the new files to pick up rustfmt settings like tab_spaces
so that the new file matches the user's preferred indentation settings. #7827-vv
) are now consistently sorted. #7877license-file
file is automatically included during publish, even if it is not explicitly listed in the include
list or is in a location outside of the root of the package. #7905CARGO_CFG_DEBUG_ASSERTIONS
and CARGO_CFG_PROC_MACRO
are no longer set when running a build script. These were inadvertently set in the past, but had no meaning as they were always true. Additionally, cfg(proc-macro)
is no longer supported in a target
expression. #7943 #7970cargo -v b
). #7837renamed_dep/feat_name
) now handle renamed dependencies correctly. #7855CARGO_TARGET_*_RUNNER=true
as a boolean. Also improved related env var error messages. #7891cargo package
/ cargo publish
should no longer buffer the entire contents of each file in memory. #7946Cargo.toml
files in a git dependency. Cargo currently walks the entire repo to find the requested package. Certain invalid manifests were already skipped, and now it should skip all of them. #7947build.out-dir
config variable to set the output directory. #7810-Zjobserver-per-rustc
feature to support improved performance for parallel rustc. #7731build-std
and crates like cc
. #7860-Ztimings
will now save its report even if there is an error. #7872--config
command-line flag to support taking a path to a config file to load. #7901-Z crate-versions
flag). #7903cargo vendor
now accepts the --versioned-dirs
option to force it to always include the version number in each package's directory name. #7631proc_macro
crate is now automatically added to the extern prelude for proc-macro packages. This means that extern crate proc_macro;
is no longer necessary for proc-macros. #7700debug_assertions
, test
, proc_macro
, or feature=
is used in a cfg()
expression. #7660.lib
DLL import libraries are now copied next to the dll for all Windows MSVC targets. Previously it was only supported for pc-windows-msvc
. This adds DLL support for uwp-windows-msvc
targets. #7758ar
field in the [target]
configuration is no longer read. It has been ignored for over 4 years. #7763--offline
empty index check, which was a false positive in some cases. #7655.
can now be included in a package by adding it to the include
list. #7680cargo login
removing alternative registry tokens when previous entries existed in the credentials file. #7708cargo vendor
from panicking when used with alternative registries. #7718[source]
that is defined multiple times will now result in an error. Previously it was randomly picking a source, which could cause non-deterministic behavior. #7751dep_kinds
in cargo metadata
are now de-duplicated. #7756Cargo.lock
was listed in .gitignore
in a subdirectory inside a git repository. Previously it was assuming Cargo.lock
was at the root of the repo. #7779--sysroot
is passed in via RUSTFLAGS
. #7798build-std
now uses --extern
instead of --sysroot
to find sysroot packages. #7699--config
command-line option to set config settings. #7649include
config setting which allows including another config file. #7649Cargo.lock
file format. This new format should support easier merges in source control systems. Projects using the old format will continue to use the old format, only new Cargo.lock
files will use the new format. #7579cargo install
will now upgrade already installed packages instead of failing. #7560BROWSER
environment variable for cargo doc --open
. #7576kind
and platform
for dependencies in cargo metadata
. #7132OUT_DIR
value is now included in the build-script-executed
JSON message. #7622cargo doc
will now document private items in binaries by default. #7593.gitignore
. #7570cargo login
text from copy/paste in token. #7588**/*.rs.bk
from .gitignore
. #7647build
config section. #7575/proc/stat
. #7580cargo vendor
. #7629http.ssl-version
config option to control the version of TLS, along with min/max versions. #7308--filter-platform
option to cargo metadata
to narrow the nodes shown in the resolver graph to only packages included for the given target triple. #7376cfg
parsing has been extracted into a separate crate named cargo-platform
. #7375.wasm
files are no longer treated as an “executable”, allowing cargo test
and cargo run
to work properly with the generated .js
file. #7476cargo clean
no longer locks the package cache. #7502cargo publish
now allows dev-dependencies without a version key to be published. A git or path-only dev-dependency will be removed from the package manifest before uploading. #7333--features
and --no-default-features
in the root of a virtual workspace will now generate an error instead of being ignored. #7507Cargo.toml
and Cargo.lock
) in a package archive now have their timestamp set to the current time instead of the epoch. #7523-Z
flag parser is now more strict, rejecting more invalid syntax. #7531include
field, and Cargo.lock
in .gitignore
, and a binary or example target, and the Cargo.lock
exists in the current project, it would fail to publish complaining the Cargo.lock
was dirty. #7448[patch]
entries. #7452cargo test
or rustc
crashes in an abnormal way, such as a signal or seg fault. #7535mtime-on-use
feature may now be enabled via the unstable.mtime_on_use
config option. #7411-Zpanic-abort-tests
to allow building and running tests with the “abort” panic strategy. #7460build-std
to use --sysroot
. #7421-Ztimings
. #7395 #7398 #7397 #7403 #7428 #7429[profile.dev.package.NAME]
. #7504.toml
filename extension. #7295--workspace
flag has been added as an alias for --all
to help avoid confusion about the meaning of “all”. #7241publish
field has been added to cargo metadata
. #7354rustc
fails. #7236cargo vendor
no longer deletes files in the vendor
directory that starts with a .
. #7242cargo fetch
will now show manifest warnings. #7243cargo publish
will now check git submodules if they contain any uncommitted changes. #7245cargo:rustc-flags
now allows -l
and -L
flags without spaces. #7257cargo install
replaces an older version of a package it will now delete any installed binaries that are no longer present in the newly installed version. #7246version
key when published. The git
value will be stripped from the uploaded crate, matching the behavior of path
dependencies. #7237home
dependency for locating home directories. #7277cc
crate on Windows to allow it to release its implicit token. #7344[email protected]/user/repo.git
) should now work. #7238.dSYM
symlinks on macOS. #7268[patch]
table. #7303.json
files where a substring of the name matches an unsupported crate type (like “bin”). #7363build.rs
script issues different rerun-if
directives between builds. Cargo was erroneously causing a rebuild after the change. #7373[patch]
table entries, preventing the patch from working after the first time it is used. #7368--features a b
flag is interpreted, restoring the original behavior where this is interpreted as --features a
along with the argument b
passed to the command. To pass multiple features, use quotes around the features to pass multiple features like --features "a b"
, or use commas, or use multiple --features
flags. #7419-Ztimings
feature to generate an HTML report on the time spent on individual compilation steps. This also may output completion steps on the console and JSON data. (docs) #7311--message-format
option to Cargo can now be specified multiple times and accepts a comma-separated list of values. In addition to the previous values it also now accepts json-diagnostic-short
and json-diagnostic-rendered-ansi
which configures the output coming from rustc in json
message mode. #7214Cargo.lock
has been introduced. This new format is intended to avoid source-control merge conflicts more often, and to generally make it safer to merge changes. This new format is not enabled at this time, though Cargo will use it if it sees it. At some point in the future, it is intended that this will become the default. #7070-q
flag will no longer suppress the root error message for an error from Cargo itself. #7116--features
command-line flag can now be specified multiple times. The list of features from all the flags are joined together. #7084rustc
output fails when querying rustc
for information like cfg
values. #7185cargo package
/cargo publish
now allows a symbolic link to a git submodule to include that submodule. #6817git-fetch-with-cli
config option, and the GIT_DIR
environment variable is set. This may happen when running cargo from git callbacks. #7082-apple-
targets with .dSYM
directories would overwrite the .d
file. #7057[patch]
table not preserving “one major version per source” rule. #7118--remap-path-prefix
flags for the metadata hash in the cargo rustc
command. This was causing the remap settings to inadvertently affect symbol names. #7134[patch]
dependencies. #7174cargo new
leaving behind a symlink on Windows when core.symlinks
git config is true. Also adds a number of fixes and updates from upstream libgit2. #7176target
directory to be excluded from backups. #7192cargo fix
panicking under some situations involving multi-byte characters. #7221cargo fix --clippy
which will apply machine-applicable fixes from Clippy. #7069-Z binary-dep-depinfo
flag to add change tracking for binary dependencies like the standard library. #7137 #7219cargo clippy-preview
will always run, even if no changes have been made. #7157CARGO_BUILD_PIPELINING
. #7062cargo clippy-preview
. #7162doctest
field to cargo metadata
to determine if a target's documentation is tested. #6953 #6965cargo vendor
command is now built-in to Cargo. This command may be used to create a local copy of the sources of all dependencies. #6869Cargo.lock
file when a package is published if it contains a binary executable target. By default, Cargo will ignore Cargo.lock
when installing a package. To force Cargo to use the Cargo.lock
file included in the published package, use cargo install --locked
. This may be useful to ensure that cargo install
consistently reproduces the same result. It may also be useful when a semver-incompatible change is accidentally published to a dependency, providing a way to fall back to a version that is known to work. #7026default-run
feature has been stabilized. This feature allows you to specify which binary executable to run by default with cargo run
when a package includes multiple binaries. Set the default-run
key in the [package]
table in Cargo.toml
to the name of the binary to use by default. #7056cargo package
now verifies that build scripts do not create empty directories. #6973cargo doc
generates duplicate outputs, which causes files to be randomly stomped on. This may happen for a variety of reasons (renamed dependencies, multiple versions of the same package, packages with renamed libraries, etc.). This is a known bug, which needs more work to handle correctly. #6998--features foo/bar
will no longer compile the current crate with the foo
feature if foo
is not an optional dependency. #7010--remap-path-prefix
is passed via RUSTFLAGS, it will no longer affect the filename metadata hash. #6966debug
is set to 0. #6971cargo doc
with an example configured with doc = true
to document correctly. #7023--locked
is used which means CARGO_HOME is not needed. #7149-Z cache-messages
flag makes cargo cache the compiler output so that future runs can redisplay previous warnings. #6933-Z mtime-on-use
no longer touches intermediate artifacts. #7050--offline
flag which allows using cargo without a network connection. #6934 #6871publish = ["crates-io"]
may be added to the manifest to restrict publishing to crates.io only. #6838DYLD_FALLBACK_LIBRARY_PATH
is not set. Also, remove /lib
from the default set. #6856cargo publish
will now exit early if the login token is not available. #6854registry.index
config value now supports relative file:
URLs. #6873.dSYM
directory is now symbolically linked next to example binaries without the metadata hash so that debuggers can find it. #6891Cargo.toml
template for now projects now includes a comment providing a link to the documentation. #6881RUST_LOG
environment variable to CARGO_LOG
so that user code that uses the log
crate will not display cargo's debug output. #6918Cargo.toml
is now always included when packaging, even if it is not listed in package.include
. #6925cargo run
now correctly passes non-UTF8 arguments to the child process. #6849cargo update
ignoring -p
arguments if the Cargo.lock
file was missing. #6904-Z install-upgrade
feature to track details about installed crates and to update them if they are out-of-date. #6798public-dependency
feature which allows tracking public versus private dependencies. #6772build.pipelining
config option (CARGO_BUILD_PIPELINING
env var). #6883publish-lockfile
feature has had some significant changes. The default is now true
, the Cargo.lock
will always be published for binary crates. The Cargo.lock
is now regenerated during publishing. cargo install
now ignores the Cargo.lock
file by default, and requires --locked
to use the lock file. Warnings have been added if yanked dependencies are detected. #6840rustc-cdylib-link-arg
key for build scripts to specify linker arguments for cdylib crates. #6298cargo test foo
, don't build examples (unless they set test = true
). #6683--quiet
flag from cargo test
to the libtest harness so that tests are actually quiet. #6358cargo package
that checks if any files are modified is now stricter. It uses a hash of the contents instead of checking filesystem mtimes. It also checks all files in the package. #6740CARGO_PKG_*
environment variables from the metadata hash and added them to the fingerprint instead. This means that when these values change, stale artifacts are not left behind. Also added the “repository” value to the fingerprint. #6785cargo metadata
no longer shows a null
field for a dependency without a library in resolve.nodes.deps
. The dependency is no longer shown. #6534cargo new
will no longer include an email address in the authors
field if it is set to the empty string. #6802cargo doc --open
now works when documenting multiple packages. #6803cargo install --path P
now loads the .cargo/config
file from the directory P. #68051.0.0+1234
) now issues a warning that it is ignored. #6806cargo install
now rejects certain combinations of flags where some flags would have been ignored. #6801cargo build
then cargo test
) where the second command could use stale results from a build script. #6720cargo fix
not working properly if a .gitignore
file that matched the root package directory. #6767panic=unwind
was set in a profile. #6781build.target
config value are now canonicalized to fix building dependencies. #6778cargo new
initializing a fossil repo. #6792git-fetch-with-cli
feature. git-fetch-with-cli
also shows more error information now when it fails. #6800--example
binaries built for the WASM target are fixed to no longer include a metadata hash in the filename, and are correctly emitted in the compiler-artifact
JSON message. #6812cargo clippy-preview
is now a built-in cargo command. #6759build-override
profile setting now includes proc-macros and their dependencies. #6811-Z offline
. #6814Cargo.lock
now includes a comment at the top that it is @generated
. #6548--exclude
flag specifies an unknown package. #6679cargo test --doc --no-run
doesn't do anything, so it now displays an error to that effect. #6628--target
completion, fallback to filename completion, fix editing the command line. #6644[patch]
section no longer generates an error. The [patch]
section is removed from the manifest before publishing. #6535build.incremental = true
config value is now treated the same as CARGO_INCREMENTAL=1
, previously it was ignored. #6688cargo run --example
. #6578-Z mtime-on-use
flag to cause the mtime to be updated on the filesystem when a crate is used. This is intended to be able to track stale artifacts in the future for cleaning up unused files. #6477 #6573-Z dual-proc-macros
to build proc macros for both the host and the target. #6547compiler-artifact
JSON messages now include an "executable"
key which includes the path to the executable that was built. #6363cargo login
now displays a confirmation after saving the token. #6466[patch]
entry does not match any package. #6470cargo metadata
now includes the links
key for a package. #6480-vv
now displays the environment variables that cargo sets when it runs a process. #6492--example
, --bin
, --bench
, or --test
without an argument now lists the available targets for those options. #6505--features
, --no-default-features
, and --all-features
flags to the cargo package
and cargo publish
commands to use the given features when verifying the package. #6453cargo fix
fails to compile the fixed code, the rustc errors are now displayed on the console. #6419--host
flag from cargo login
, it is unused. #6466DYLD_FALLBACK_LIBRARY_PATH
instead of DYLD_LIBRARY_PATH
. #6355RUSTFLAGS
is now included in the metadata hash, meaning that changing the flags will not overwrite previously built files. #6503cargo update -p somecrate
. #5702cargo fix
will now ignore suggestions that modify multiple files. #6402cargo fix
will now only fix one target at a time, to deal with targets which share the same source files. #6434cargo init
will now avoid creating duplicate entries in .gitignore
files. #6521[patch]
tables instead of just URLs. #6456cargo metadata
added the registry
key for dependencies. #6500-
and _
characters). #6469cargo login
now displays the /me
URL from the registry config. #6466cargo login --registry=NAME
now supports interactive input for the token. #6466api
key from config.json
to indicate they do not support API access. #6466--message-format=json
with metabuild. #6432c
for cargo check
. #6218http.multiplexing
config value may be used to disable it. #6271--update-head-ok
git flag when using the net.git-fetch-with-cli
option. This can help prevent failures when fetching some repositories. #6250cargo package
, the filesystem mtimes are no longer set, which was failing on some rare filesystems. #6257crate-type = ["proc-macro"]
is now treated the same as proc-macro = true
in Cargo.toml
. #6256dependencies
, features
, target
, or badges
is set in a virtual workspace. Warnings are displayed if replace
or patch
is used in a workspace member. #6276.rmeta
files are no longer hard-linked into the base target directory (target/debug
). #6292cargo build
(without --release
) benchmarks are now built using the “test” profile instead of “bench”. This makes it easier to debug benchmarks, and avoids confusing behavior. #6309b
, r
, t
, and c
). #6259autobins=false
now disables auto-discovery of inferred targets. #6329cargo verify-project
will now fail on stable if the project uses unstable features. #6326.
within the name are now allowed. #6255cargo clean --release
now only deletes the release directory. #6349cargo new
. #6243cargo run --example NAME
to work correctly if the example sets crate_type = ["bin"]
. #6330cargo package
git discovery being too aggressive. The --allow-dirty
now completely disables the git repo checks. #6280[patch]
deps which resulted in cargo build
rebuilding when it shouldn't. #6493"compile_mode"
key to the build-plan JSON structure to be able to distinguish running a custom build script versus compiling the build script. #6331--out-dir
no longer copies over build scripts. #6300http.multiplexing
config value to enable. #6005http.debug
configuration value to debug HTTP connections. Use CARGO_HTTP_DEBUG=true RUST_LOG=cargo::ops::registry cargo build
to display the debug information. #6166CARGO_PKG_REPOSITORY
environment variable is set with the repository value from Cargo.toml
when building . #6096cargo test --doc
now rejects other flags instead of ignoring them. #6037cargo install
ignores ~/.cargo/config
. #6026cargo version --verbose
is now the same as cargo -vV
. #6076Cargo.lock
are now preserved. #6181cargo build -vv
), build script output is prefixed with the package name and version, such as [foo 0.0.1]
. #6164cargo fix --broken-code
fails to compile after fixes have been applied, the files are no longer reverted and are left in their broken state. #6316cargo run
. #6004+toolchain
in bash completion. #6038cargo test --all-targets
running lib tests three times. #6039cargo install
on a git repo with multiple binaries. #6060target/debug
and target/debug/deps
. #6167panic=abort
is used. #6170--registry
flag to cargo install
. #6128registry.default
configuration value to specify the default registry to use if --registry
flag is not passed. #6135--registry
flag to cargo new
and cargo init
. #6135resolve.nodes.deps
key to cargo metadata
, which includes more information about resolved dependencies, and properly handles renamed dependencies. #5871-v
when failing to discover if files are dirty in a git repository. Also fix a problem with discovery on Windows. #5858--bin
, --test
, --example
, --bench
, or --lib
can be used in a workspace without selecting a specific package. #5873cargo run
can be used in a workspace without selecting a specific package. #5877cargo doc --message-format=json
now outputs JSON messages from rustdoc. #5878--message-format=short
to show one-line messages. #5879.cargo_vcs_info.json
file to .crate
packages that captures the current git hash. #5886net.git-fetch-with-cli
configuration option to use the git
executable to fetch repositories instead of using the built-in libgit2 library. #5914required-features
to cargo metadata
. #5902cargo uninstall
within a package will now uninstall that package. #5927--allow-staged
flag to cargo fix
to allow it to run if files are staged in git. #5943net.low-speed-limit
config value, and also honor net.timeout
for http operations. #5957--edition
flag to cargo new
. #5984target.'cfg(โฆ)'.runner
config value to specify the run/test/bench runner for targets that use config expressions. #5959cargo run
will not kill child processes when the main process exits. #5887opener
crate to open a web browser with cargo doc --open
. This should more reliably select the system-preferred browser on all platforms. #5888build.target
config value when running cargo install
. #5874RUSTC_WRAPPER
for cargo fix
. #5983RUSTC_WRAPPER
. #5985Cargo.toml
. #5908cargo fix
now always runs, even if it was run previously. #5944cargo doc --document-private-items
. 6022