31 releases

0.15.1 Aug 2, 2020
0.15.0 May 31, 2020
0.14.5 May 13, 2020
0.14.3 Mar 21, 2020
0.1.2 May 27, 2015

#12 in Development tools

Download history 6121/week @ 2020-04-22 6085/week @ 2020-04-29 7550/week @ 2020-05-06 7341/week @ 2020-05-13 7939/week @ 2020-05-20 7367/week @ 2020-05-27 7705/week @ 2020-06-03 8488/week @ 2020-06-10 8606/week @ 2020-06-17 8377/week @ 2020-06-24 7561/week @ 2020-07-01 8212/week @ 2020-07-08 4560/week @ 2020-07-15 4920/week @ 2020-07-22 5796/week @ 2020-07-29 4939/week @ 2020-08-05

30,962 downloads per month
Used in 16 crates (8 directly)

Apache-2.0

18KB
362 lines

rust-crates-index

crates-index on Crates.io

Library for retrieving and interacting with the crates.io index

Documentation

Much of this code was extracted from github.com/huonw/crates.io-graph

Examples

let index = crates_index::Index::new("_index".into());
if !index.exists() {
    index.retrieve().expect("Could not retrieve crates.io index");
}
for crate_ in index.crates() {
    let most_recent = crate_.latest_version();
    println!("crate name: {}", most_recent.name());
    println!("crate version: {}", latest_version.version());
}

Similar crates

License

Licensed under version 2 of the Apache License


lib.rs:

Library for retrieving and interacting with the crates.io index.

Examples

let index = crates_index::Index::new_cargo_default();
if !index.exists() {
   index.retrieve().expect("Could not fetch crates.io index");
}
for crate_ in index.crates() {
   let latest_version = crate_.latest_version();
   println!("crate name: {}", latest_version.name());
   println!("crate version: {}", latest_version.version());
}

Dependencies

~11MB
~266K SLoC