CARGO-INST...DATE-CONFIG(1)
โจ CARGO-INSTALL-UPDATE-CONFIG โจ
Okay bestie, listen up ๐
โ this is the manual page for cargo-install-update-config, a Cargo subcommand that's all about checking and applying updates to installed executables. But specifically? The configuration part. No cap, this is where you tweak the compilation vibes for your packages. ๐
๐ธ SYNOPSIS ๐ธ
cargo install-update-config OPTIONS PACKAGE
๐ DESCRIPTION ๐
Real talk: this command lets you configure the cargo/rustc compilation commandlines for packages. It's giving "full control over the build" energy. โจ
Here's what you can set (the settable options, periodt):
toolchain- whether to use default features
- additional feature list
- build profile
- whether to install prereleases other than those for the currently-installed version
Cargo.lockenforcement- version range locks
- environment variable value or removal
Now, if there is no configuration for a package โ like, zero, nada โ the $CARGO_DIR/.crates2.json file gets parsed instead. Depending on your Cargo version, that might yield the following subset of data:
- whether to use default features
- additional feature list
- build profile
๐ก For all the general info, go check out cargo-install-update(1). That's your main character manpage.
๐ฆ OPTIONS ๐ฆ
Okay, let's get into the flags, bestie. There's a lot, but we're gonna slay through them together. ๐ช
PACKAGEโ the package you're adjusting settings for. Obvi.-t,--toolchain [TOOLCHAIN]โ Set the toolchain to use. Pass an empty string to use the cargo default. (Yes, a literal empty string. Iconic.) โจ-f,--feature [FEATURE]...โ Enable a cargo feature. You can stack these, so go off. ๐-n,--no-feature [FEATURE]...โ Disable/remove a cargo feature. The anti--f. ๐-d,--default-features [DEFAULT]โ Enable or disable default features. The argument can be"yes","true","1"to enable, or"no","false","0"to disable. It's giving boolean energy. ๐ฅ--debugโ Compile in debug mode. Same as--build-profile dev. Lowkey useful for testing. ๐--releaseโ Compile in release mode (default). Same as--build-profile release. This is the one you probably want. ๐--build-profile [PROFILE]โ Compile with PROFILE (dev/release/test/benchor defined in$CARGO_DIR/.cargo/config.tomlunder[profile.PROFILE]). Pick your fighter. ๐--install-prereleasesโ Install the version even if it's a prerelease. Living on the edge, bestie. โญ--no-install-prereleasesโ Don't update to prerelease versions.
โ ๏ธ Important caveat, no cap: If the currently-installed version is a prerelease, and the candidate version is a newer prerelease for the same major.minor.patch version, it will be installed regardless of this setting. (To wit: this setting controls updates to prereleases, not within them.) So like, don't think it blocks everything. ๐
--enforce-lockโ RequireCargo.lockis up to date. Strict queen behavior. ๐--no-enforce-lockโ Don't requireCargo.lockto be up to date. (default). Chill vibes. ๐--respect-binariesโ Only install the binaries that are already installed for this package. Selective. โจ--no-respect-binariesโ Install all binaries. (default). Go big or go home. ๐ฅ-v,--version [VERSION_REQ]โ Require a cargo-compatible version range not to update beyond.
Example:">1.3","^0.1.8".
-a,--any-versionโ Allow any version. YOLO. ๐-e,--environment [VARIABLE=VALUE]...โ Set environmentVARIABLEtoVALUEin the cargo install process. You can stack these too. ๐-E,--clear-environment [VARIABLE]...โ Remove environmentVARIABLEfrom the cargo install process. Bye felicia. ๐--inherit-environment [VARIABLE]...โ Don't do anything to environmentVARIABLE. Leave it alone, it's fine. ๐-r,--resetโ Roll back the configuration to the empty defaults. Fresh start, main character energy. โจ-c,--cargo-dir CARGO_DIRโ Set the directory containing cargo metadata.
Required. Default:"$CARGO_HOME", then"$HOME/.cargo", otherwise manual. So like, it'll try to figure it out, but you might need to help.
๐ง EXAMPLES ๐ง
Okay so here's a real example. Watch and learn, bestie:
cargo install-update-config -t nightly -d 0 -f log -f colour -v ~2.3 -e RUSTC_WRAPPER=sccache clippy
This sets clippy to be compiled with the nightly toolchain without default features, with log and colour features. Obsessed. ๐
Example output, for the visual learners:
Toolchain nightly
Default features true
Features log
colour
Environment variables RUSTC_WRAPPER=sccache
See how it all lines up? Slay. ๐
๐ AUTHOR ๐
This page was written by a whole squad of legends, fr fr. Shoutout to:
- ะฝะฐะฑ <nabijaczleweli@nabijaczleweli.xyz>
- Yann Simon <yann.simon.fr@gmail.com>
- ven <vendethiel@hotmail.fr>
- Cat Plus Plus <piotrlegnica@piotrl.pl>
- Liigo <liigo@qq.com>
- azyobuzin <azyobuzin@users.sourceforge.jp>
- Tatsuyuki Ishi <ishitatsuyuki@gmail.com>
- Tom Prince <tom.prince@twistedmatrix.com>
- Mateusz Mikuลa <mati865@gmail.com>
- sinkuu <sinkuupump@gmail.com>
- Alex Burka <aburka@seas.upenn.edu>
- Matthias Krรผger <matthias.krueger@famsik.de>
- Daniel Holbert <dholbert@cs.stanford.edu>
- Jonas Bushart <jonas@bushart.org>
- Harrison Metzger <harrisonmetz@gmail.com>
- Benjamin Bannier <bbannier@gmail.com>
- Dimitris Apostolou <dimitris.apostolou@icloud.com>
- Corbin Uselton <corbinu@decimal.io>
- QuarticCat <QuarticCat@protonmail.com>
- Artur Sinila <freesoftware@logarithmus.dev>
- qthree <qthree3@gmail.com>
- tranzystorekk <tranzystorek.io@protonmail.com>
- Paul Barker <paul@pbarker.dev>
- Benoรฎt Cortier
- Biswapriyo Nath <nathbappai@gmail.com>
- Shiraz <smcclennon@protonmail.com>
- Victor Song <vms2@rice.edu>
- chrisalcantara <chris@chrisalcantara.com>
- Utkarsh Gupta <utkarshgupta137@gmail.com>
- nevsal
- Rui Chen <https://chenrui.dev>
- Lynnesbian <https://fedi.lynnesbian.space/@lynnesbian>
- Rene Leonhardt
- Maxime Guerreiro <maxime@cloudflare.com>
- and Brian
That's a lot of icons, and we love that for them. ๐
๐ซถ SPECIAL THANKS ๐ซถ
To all who support further development, in particular:
- ThePhD
- Embark Studios
- Lars Strojny
- EvModder
Y'all are the real MVPs. ๐
๐ญ REPORTING BUGS ๐ญ
Find a bug? Don't just scream into the void โ report it here:
<https://github.com/nabijaczleweli/cargo-update/issues>
The devs will thank you, fr fr. ๐
๐ SEE ALSO ๐
That's the main repo. Go explore, bestie. โจ
๐ Sign-off time: This iconic page comes to you from the cargo-update developers, dated January 1980. Yes, that date is a whole mood. Stay slaying, and may your builds always compile on the first try. ๐
๐โจ
๐ฆ where this page comes from
- nixos 26.05: cargo-update 20.0.0
- nixpkgs unstable: cargo-update 22.1.1
- ๐ girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms