# rust-releases [![ci-msrv](https://github.com/foresterre/rust-releases/actions/workflows/msrv.yml/badge.svg)](https://github.com/foresterre/rust-releases/actions/workflows/msrv.yml) [![Crates.io version shield](https://img.shields.io/crates/v/rust-releases.svg)](https://crates.io/crates/rust-releases) [![Docs](https://docs.rs/rust-releases/badge.svg)](https://docs.rs/rust-releases) [![Crates.io license shield](https://img.shields.io/crates/l/rust-releases.svg)](https://crates.io/crates/rust-releases) [![MSRV shield](https://img.shields.io/badge/MSRV-1.53.0-informational)](https://github.com/foresterre/cargo-msrv) | 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 | `*` When unreleased, MSRV subject to change ## Introduction 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](https://static.rust-lang.org/manifests.txt) (source) 3) Parse Rust in-repo [RELEASES.md](https://raw.githubusercontent.com/rust-lang/rust/master/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](https://docs.rs/rust-releases/latest/rust_releases/source/trait.Source.html) trait. `Source` provides a `build_index` method, which can be used to build a catalog of released Rust versions. In addition, for all solution except `RustDistWithCLI`, it is possible to let this crate [fetch](https://docs.rs/rust-releases/latest/rust_releases/source/trait.FetchResources.html) the required input documents. ## 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, |
Fast | - | |
FetchResources | ✅ | Medium fast (~10 seconds) | ~1 MB | |||
RustDistWithCLI |
Source | ✅ | Stable, |
Fast | - | |
FetchResources | ❌ | Slow (~1 minute) | ~8 MB | |||
TDB |
Source | ✅ | Stable, |
Medium | - | Input data works again(#9). Further implementation commitments TBD5 |
FetchResources | ✅ | Extremely slow (~1 hour) | ~418 MB |