CARGO_PKG_README
environment variable is now set to the path to the README file when compiling a crate. #11645--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. #11770-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-Zjobserver-per-rustc
. Its rustc counterpart never got landed. #11764sha2
crate for SHA256 calculation. #11795 #11807base64
v0.21.0. #11796cargo-deny
in Cargo its own CI pipeline. #11761cargo 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 will. We consider it as a wrong behavior to only pass it to recursive invocations. #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