百科.dev
全部条目AI 编程趋势榜开源项目技术资讯提交条目
登录
< 返回工具列表
C

cargo-outdated

> 编程语言
开源

一个用于显示 Rust 依赖项已过期的货物子命令

1.4K stars0 点赞0 次浏览
访问官网GitHub

工具介绍

一个用于显示 Rust 依赖项已过期的货物子命令

cargo-outdated

Linux:

A cargo subcommand for displaying when Rust dependencies are out of date

About

cargo-outdated is for displaying when dependencies have newer versions available.

How it works

The functionality of cargo-outdated largely depends on the cargo builtin command cargo update.

To retrieve the list of available SemVer compatible dependencies, cargo-outdated firstly creates a temporary workspace, then executes cargo update against it, finally compares the temporary dependency tree with the original one.

Similarly, to check the latest dependencies, cargo-outdated replaces the SemVer requirements of direct dependencies with wildcards then goes through the same process.

Demo

Once installed (see below) running cargo outdated in a project directory looks like the following:

…

Installing

Prebuilt versions of cargo-outdated can be downloaded using cargo binstall:

cargo binstall cargo-outdated

To build from source, cargo-outdated can be installed or updated with cargo install:

cargo install --locked cargo-outdated

or

cargo install --locked --git https://github.com/kbknapp/cargo-outdated

Compiling

Follow these instructions to compile cargo-outdated, then skip down to Installation.

  1. Ensure you have current version of cargo and Rust installed
  2. Clone the project $ git clone https://github.com/kbknapp/cargo-outdated && cd cargo-outdated
  3. Build the project $ cargo build --release
  4. Once complete, the binary will be located at target/release/cargo-outdated

Installation and Usage

All you need to do is place cargo-outdated somewhere in your $PATH. Then run cargo outdated anywhere in your project directory. For full details see below.

Linux / OS X

You have two options, place cargo-outdated into a directory that is already located in your $PATH variable (To see which directories those are, open a terminal and type echo "${PATH//:/\n}", the quotation marks are important), or you can add a custom directory to your $PATH

Option 1 If you have write permission to a directory listed in your $PATH or you have root permission (or via sudo), simply copy the cargo-outdated to that directory # sudo cp cargo-outdated /usr/local/bin

Option 2 If you do not have root, sudo, or write permission to any directory already in $PATH you can create a directory inside your home directory, and add that. Many people use $HOME/.bin to keep it hidden (and not clutter your home directory), or $HOME/bin if you want it to be always visible. Here is an example to make the directory, add it to $PATH, and copy cargo-outdated there.

Simply change bin to whatever you'd like to name the directory, and .bashrc to whatever your shell startup file is (usually .bashrc, .bash_profile, or .zshrc)

mkdir ~/bin
echo "export PATH=$PATH:$HOME/bin" >> ~/.bashrc
cp cargo-outdated ~/bin
source ~/.bashrc

MacOS

This library depends on OpenSSL. On MacOS a newer version of OpenSSL than is installed by default is needed. This can be installed with Homebrew via brew install openssl or openssl can be vendored in with --features vendored-openssl. Learn more about building OpenSSL here,

Windows

On Windows 7/8 you can add directory to the PATH variable by opening a command line as an administrator and running

setx path "%path%;C:\path\to\cargo-outdated\binary"

Otherwise, ensure you have the cargo-outdated binary in the directory which you operating in the command line from, because Windows automatically adds your current directory to PATH (i.e. if you open a command line to C:\my_project\ to use cargo-outdated ensure cargo-outdated.exe is inside that directory as well).

Options

There are a few options for using cargo-outdated which should be somewhat self explanatory.

…

Minimum Supported Rust Version (MSRV)

The MSRV of this crate is what is required to run cargo outdated, you may be able to compile cargo outdated itself on an earlier version of Rust. However, because cargo outdated uses cargo internally, it requires a specific minimum version to run successfully.

The current MSRV can be found in the Cargo.toml under the package.rust-version field.

License

cargo-outdated is released under the terms of either the MIT or Apache 2.0 license. See the LICENSE-MIT or LICENSE-APACHE file for the details.

Issues· 0 开放

查看全部 Issues在 GitHub 打开

暂无开放 Issues,或尚未同步最近议题。

> 标签

Rust

暂无评论,来聊聊你的看法吧

> 工具信息

发布日期2026年8月1日
最后更新2026年9月17日
分类编程语言
定价开源

> 相关工具

T
TypeScript
JavaScript 的超集,为前端与全栈提供静态类型
P
Python
通用编程语言,广泛用于 Web、数据与 AI
G
Go
Google 推出的简洁高效系统语言