12 releases (breaking)

0.28.0 Jan 24, 2024
0.27.0 Aug 24, 2023
0.26.0 Apr 2, 2023
0.25.0 Mar 28, 2023
0.15.1 Apr 10, 2021

#2700 in Parser implementations

Download history 1447/week @ 2023-12-20 1431/week @ 2023-12-27 1451/week @ 2024-01-03 1758/week @ 2024-01-10 1726/week @ 2024-01-17 1904/week @ 2024-01-24 1541/week @ 2024-01-31 2014/week @ 2024-02-07 1676/week @ 2024-02-14 1364/week @ 2024-02-21 1771/week @ 2024-02-28 1897/week @ 2024-03-06 1604/week @ 2024-03-13 1472/week @ 2024-03-20 1328/week @ 2024-03-27 1416/week @ 2024-04-03

6,169 downloads per month
Used in 7 crates (5 directly)


145 lines


ci-msrv Crates.io version shield Docs Crates.io license shield MSRV shield

rust-releases version MSRV
0.21.1 1.51
0.22.0 1.53
0.23.0 1.63
0.24.0 1.63
0.25.0 1.63
0.26.0 1.63
0.27.0 1.67
0.28.0 1.68

* When unreleased, MSRV subject to change


The Rust programming language uses deterministic versioning for toolchain releases. Stable versions use SemVer, while nightly, beta and historical builds can be accessed by using dated builds (YY-MM-DD).

Unfortunately, a clean index of releases is not available any more. I decided to research which resources where still available and found the following solutions:

  1. Use the AWS index (source)
  2. Build from individual release manifests (source)
  3. Parse Rust in-repo RELEASES.md

Each of these options requires additional parsing, which is where this crate comes in: the rust-releases crate can obtain, parse and build an index from the above resources. This crate also provides methods to iterate over versions in a linear fashion, or by using a bisect binary search strategy.

Each data source implements the Source trait. Source provides a build_index method, which can be used to build a catalog of released Rust versions.

Implemented options

Type of data source Trait Available Channels1 Speed2, 3 On disk cache size4 Notes
RustChangelog Source Stable Fast - Enabled by default. Disable by setting default-features = false for the rust-releases dependency in your Cargo.toml manifest.
FetchResources Instant (<1 second) ~491 KB
RustDist Source Stable, Beta & NightlyTo be implemented Fast -
FetchResources Medium fast (~10 seconds) ~1 MB

1: Currently most of the rust-releases public API supports only stable. Support for the beta and nightly channel is work-in-progress, and the table currently lists whether there is theoretical support for these channels.
2: Speed for the Source trait primarily consist of parsing speed
3: Speed for the FetchResources trait is primarily limited by your own download speed, and the rate limiting of the server from which the resources are fetched
4: Approximate as of 2021-03-03
5: While the channel manifests are the most complete source available, they're practically too slow to download without adding some incremental implementation first, while this would still require a large initial download. Since we currently do not use most of the data available in the manifest files, it's usually better to instead pick a different source. It's more likely we'll take the channel manifests, take a subset and compile it into a smaller source type.

Which data source should I use?

Since support for the beta and nightly channels is work-in-progress, I would advise to use the RustChangelog data source as it's a small download, immediately up-to-date on release and fast to parse. It only supports stable channel releases.

Alternatively, the RustDist or RustDistWithCLI data sources can be useful, especially when support for the beta and nightly channel are added. They both get their input data from the Rust AWS S3 distribution bucket. When using RustDist, the input data can be obtained with the FetchResources trait implementation. For RustDistWithCLI, you have to obtain the input data yourself (by running the aws cli with the following options aws --no-sign-request s3 ls static-rust-lang-org/dist/ > dist.txt(source)).


cargo-msrv is a tool which can be used to determine the minimal supported Rust version (MSRV). It builds your Rust crate and checks whether the build succeeds or fails, as this gives the most complete idea whether a version will work with your (external) dependencies. cargo-msrv uses bisection, or a reverse-linear search, to find the lowest appropriate Rust version. For this, it needs to have an idea about the toolchains which have been released, and can be installed.

Originally we simply parsed the latest channel manifest, and then decreased the minor semver version, but this was obviously not great for many reasons, including:

  • Except for the latest released version, we are left guessing the decreased version numbers actually exist
  • Only stable versions were supported, not nightly, beta, or other channels
  • Only 1.x.0 versions were supported

This was not ideal, thus rust-releases was born. Now cargo-msrv can iterate over Rust releases of which we know they exist and are available.


Defines the core routines required to implement a Source.

Please, see the rust-releases for additional documentation on how this crate can be used.


~19K SLoC