doc
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 vendor
#8937cargo 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. #7344git@github.com/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