56 releases (33 stable)

2.5.3 Feb 16, 2020
2.5.0 Dec 13, 2019
2.3.1 Nov 8, 2019
1.8.4 Sep 20, 2019
0.6.0 Nov 30, 2016

#7 in Cargo plugins

Download history 1758/week @ 2019-11-10 1090/week @ 2019-11-17 810/week @ 2019-11-24 1760/week @ 2019-12-01 2226/week @ 2019-12-08 1626/week @ 2019-12-15 652/week @ 2019-12-22 579/week @ 2019-12-29 793/week @ 2020-01-05 783/week @ 2020-01-12 808/week @ 2020-01-19 2305/week @ 2020-01-26 1291/week @ 2020-02-02 1121/week @ 2020-02-09 1843/week @ 2020-02-16

5,207 downloads per month

MIT license

110KB
1.5K SLoC

cargo-update TravisCI build status AppVeyorCI build status Licence Crates.io version

A cargo subcommand for checking and applying updates to installed executables

Documentation

Manpage

Installation

Firstly, ensure you have CMake and the Required Libraries™.

Then proceed as usual:

cargo install cargo-update

If that doesn't work and you're on Mac:

If it still doesn't work, slam open an issue or comment on one of the existing relevant ones.

Required libraries

Library *X package name msys2 package name
libgit2 libgit2-devel mingw-w64-x86_64-libgit2
libssh2 libssh2-devel mingw-w64-x86_64-libssh2
openssl openssl-devel mingw-w64-x86_64-openssl

Usage

cargo install-update -a - check for newer versions and update all installed packages.

cargo install-update crate1 crate2 ... - check for newer versions and update selected packages, will not install new packages.

For more information and examples see the manpage.

Self-update

cargo-update will update itself seamlessly on Linux and Windows.

On Windows the following strategy is applied:

  • Check for old versions, remove them
  • Add the current version to the current executable's extension
  • Create an empty file in place of the just-renamed file (this way cargo install will "replace" it and not duplicate the entry in .crates.toml)

Troubleshooting

Some crates, like clippy and rustfmt, have moved from Crates.io to being a rustup component. If you'd installed them beforehand, then added them via rustup component, they might not have been removed from the list of crates installed via cargo install, and you might come across errors such as

$ cargo install-update -a
Updating registry 'https://github.com/rust-lang/crates.io-index'

Package          Installed  Latest    Needs update
clippy           v0.0.179   v0.0.302  Yes
.....

Updating clippy
    Updating crates.io index
  Installing clippy v0.0.302
   Compiling clippy v0.0.302
error: failed to compile `clippy v0.0.302`, intermediate artifacts can be found at `/tmp/cargo-installxHfj2y`

Caused by:
  failed to run custom build command for `clippy v0.0.302`

Caused by:
  process didn't exit successfully: `/tmp/cargo-installxHfj2y/release/build/clippy-ffeedc2f188020a4/build-script-build` (exit code: 1)
--- stderr

error: Clippy is no longer available via crates.io

help: please run `rustup component add clippy-preview` instead

In that case, run cargo install --list to verify that they're still there and cargo uninstall them, which will deregister the cargo versions and leave you with the rustup ones.

Special thanks

To all who support further development on Patreon, in particular:

  • ThePhD

Dependencies

~13MB
~323K SLoC