CARGO-INST...DATE-CONFIG(1)

๐Ÿ“ฆ version 22.1.1, in nixos 26.05, nixpkgs unstable

โœจ 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.lock enforcement
  • 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/bench or defined in $CARGO_DIR/.cargo/config.toml under [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 โ€” Require Cargo.lock is up to date. Strict queen behavior. ๐Ÿ‘‘
  • --no-enforce-lock โ€” Don't require Cargo.lock to 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 environment VARIABLE to VALUE in the cargo install process. You can stack these too. ๐ŸŽ€
  • -E, --clear-environment [VARIABLE]... โ€” Remove environment VARIABLE from the cargo install process. Bye felicia. ๐Ÿ‘‹
  • --inherit-environment [VARIABLE]... โ€” Don't do anything to environment VARIABLE. 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