#version #latest


Check if your rust executable is the latest available version

8 releases (2 stable)

1.0.1 May 27, 2021
1.0.0 Jan 6, 2021
0.4.1 Aug 5, 2020
0.4.0 Feb 14, 2020
0.1.0 Jan 25, 2020

#169 in Development tools

Download history 42/week @ 2021-10-02 66/week @ 2021-10-09 62/week @ 2021-10-16 17/week @ 2021-10-23 34/week @ 2021-10-30 50/week @ 2021-11-06 8/week @ 2021-11-13 53/week @ 2021-11-20 58/week @ 2021-11-27 28/week @ 2021-12-04 97/week @ 2021-12-11 25/week @ 2021-12-18 33/week @ 2021-12-25 14/week @ 2022-01-01 18/week @ 2022-01-08 27/week @ 2022-01-15

92 downloads per month
Used in 5 crates


430 lines


Crates.io Docs.rs Crates.io CI

Check if your rust executable is the latest available version on Crates.io

The Basics

use check_latest::check_max;

if let Ok(Some(version)) = check_max!() {
    println!("Version {} is now available!", version);

Please check the examples and the documentation For more usage.


This crate has two features: async and blocking. By default, blocking is enabled and async is disabled. This default is compatible with the example in the section titled The Basics. If you want to use asynchronous requests, you can swap these features with the following in you Cargo.toml.

version = "*"
default-features = false
features = ["async"]

NOTE There's nothing stopping you from enabling both async and blocking, but that's unlikely to be necessary.


Making this Library Optional

If you use this library for your binary, you should probably make this an optional feature. Simply checking for the latest version on Crates.io brings over a lot of dependencies in order to send a request to the API and parse the response. Some users may want to turn off this feature for a smaller binary. Some may simply prefer not to be told to install an update.

You can make this feature optional by adding this to your Cargo.toml.

version = "*"
optional = true

To selectively compile the parts of your binary that check for later releases, add this attribute to the parts that should be compiled if this feature is enabled.

#[cfg(feature = "check-latest")]


~183K SLoC