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

#7 in Development tools

Download history 1450/week @ 2019-05-14 1532/week @ 2019-05-21 2048/week @ 2019-05-28 2118/week @ 2019-06-04 2843/week @ 2019-06-11 2835/week @ 2019-06-18 3291/week @ 2019-06-25 3893/week @ 2019-07-02 4925/week @ 2019-07-09 5483/week @ 2019-07-16 5294/week @ 2019-07-23 5946/week @ 2019-07-30 6720/week @ 2019-08-06 7543/week @ 2019-08-13 7677/week @ 2019-08-20

19,968 downloads per month
Used in 5 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
~262K SLoC