cargo-update

Table of contents

Intro

ripgrep, comtrya, and https://github.com/zellij-org/zellij are just a few Rust tools which are part of my daily terminal workflow.

One way to keep them up2date would be to use a tool like yay. I use yay for everything related to pacman or aur packages on my Manjaro machine. Not everyone publishes their crate so I could install it via yay. My solution for the problem is cargo-update. It keeps all crates that were installed via cargo install <crate-name> up2date by calling cargo install-update -a.

My workflow

  • I installed cargo-update via cargo install cargo-update.
  • To access all my tools, I added ~/.cargo/bin to my $PATH:
export PATH=~/bin:~/.cargo/bin:~/go/bin:$JAVA_HOME/bin:$PATH
  • I run cargo install-update -a every other week
❯ cargo install-update -a
    Updating registry 'https://github.com/rust-lang/crates.io-index'

Package                      Installed  Latest   Needs update
alacritty                    v0.11.0    v0.11.0  No
bacon                        v2.5.0     v2.5.0   No
cargo-audit                  v0.17.4    v0.17.4  No
cargo-auditable              v0.6.0     v0.6.0   No
cargo-modules                v0.7.5     v0.7.5   No
cargo-nextest                v0.9.49    v0.9.49  No
cargo-outdated               v0.11.2    v0.11.2  No
cargo-release                v0.24.4    v0.24.4  No
cargo-update                 v11.1.1    v11.1.1  No
cargo-upgrades               v1.3.5     v1.3.5   No
cargo-why                    v0.2.0     v0.2.0   No
comtrya                      v0.8.3     v0.8.3   No
evcxr_repl                   v0.14.2    v0.14.2  No
fbtoggl                      v0.8.13    v0.8.13  No
fw                           v2.16.1    v2.16.1  No
git-interactive-rebase-tool  v2.2.1     v2.2.1   No
git-trim                     v0.4.4     v0.4.4   No
hyperfine                    v1.15.0    v1.15.0  No
igrep                        v1.1.0     v1.1.0   No
kleinwuerfel                 v0.4.0     v0.4.0   No
mcfly                        v0.7.1     v0.7.1   No
mdbook                       v0.4.25    v0.4.25  No
rage                         v0.9.0     v0.9.0   No
sniffnet                     v1.0.1     v1.0.1   No
zellij                       v0.34.4    v0.34.4  No

No packages need updating.
Overall updated 0 packages.

Cheers!