#index #packaging #meta #dependencies #crates

crates-index

Library for retrieving and interacting with the crates.io index

51 releases (18 stable)

new 3.4.0 Dec 11, 2024
3.3.0 Nov 14, 2024
3.2.0 Aug 23, 2024
3.1.0 Jul 30, 2024
0.1.2 May 27, 2015

#1473 in Development tools

Download history 20494/week @ 2024-08-21 20943/week @ 2024-08-28 27059/week @ 2024-09-04 23975/week @ 2024-09-11 20062/week @ 2024-09-18 17294/week @ 2024-09-25 19491/week @ 2024-10-02 16026/week @ 2024-10-09 16982/week @ 2024-10-16 16676/week @ 2024-10-23 18366/week @ 2024-10-30 24506/week @ 2024-11-06 24564/week @ 2024-11-13 35633/week @ 2024-11-20 33050/week @ 2024-11-27 33599/week @ 2024-12-04

132,698 downloads per month
Used in fewer than 30 crates

Apache-2.0

100KB
2K SLoC

crates-index

crates-index on Crates.io

Library for retrieving and interacting with the crates.io registry index using either the git or sparse protocol.

The index contains metadata for all Rust libraries and programs published on crates.io: their versions, dependencies, and feature flags.

Documentation

Example

let index = crates_index::GitIndex::new_cargo_default()?;

for crate_releases in index.crates() {
    let _ = crate_releases.most_recent_version(); // newest version
    let crate_version = crate_releases.highest_version(); // max version by semver
    println!("crate name: {}", crate_version.name());
    println!("crate version: {}", crate_version.version());
}

Changelog

Please find the changelog in CHANGELOG.md.

Similar crates

  • tame-index - a hard fork with many improvements and advantages
  • crates_io_api - a way to talk to the HTTP API of crates.io

License

Licensed under version 2 of the Apache License

Dependencies

~1–14MB
~199K SLoC