22 releases (12 breaking)

0.13.3 Aug 27, 2019
0.13.2 Jul 27, 2019
0.13.1 Jun 22, 2019
0.13.0 Mar 25, 2019
0.1.2 May 27, 2015

#10 in Development tools

Download history 5323/week @ 2019-07-15 5167/week @ 2019-07-22 5763/week @ 2019-07-29 6697/week @ 2019-08-05 7551/week @ 2019-08-12 7682/week @ 2019-08-19 7427/week @ 2019-08-26 7999/week @ 2019-09-02 8030/week @ 2019-09-09 8216/week @ 2019-09-16 8672/week @ 2019-09-23 9484/week @ 2019-09-30 9328/week @ 2019-10-07 9686/week @ 2019-10-14 9339/week @ 2019-10-21

19,968 downloads per month
Used in 6 crates

Apache-2.0

14KB
263 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

extern crate crates_index;

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 latest_version = crate_.latest_version();
    println!("crate name: {}", latest_version.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

extern crate crates_index;

let index = crates_index::Index::new("_index");
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
~269K SLoC