#packaging #index #dependencies #crate #meta

crates-index

Library for retrieving and interacting with the crates.io index

19 releases (12 breaking)

0.13.0 Mar 25, 2019
0.12.1 Dec 10, 2018
0.12.0 Apr 28, 2018
0.11.0 Feb 10, 2018
0.1.2 May 27, 2015

#14 in Memory management

Download history 734/week @ 2019-01-20 845/week @ 2019-01-27 592/week @ 2019-02-03 554/week @ 2019-02-10 770/week @ 2019-02-17 958/week @ 2019-02-24 819/week @ 2019-03-03 801/week @ 2019-03-10 770/week @ 2019-03-17 566/week @ 2019-03-24 675/week @ 2019-03-31 1077/week @ 2019-04-07 1318/week @ 2019-04-14 932/week @ 2019-04-21 894/week @ 2019-04-28

3,048 downloads per month
Used in 4 crates

Apache-2.0

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

~8.5MB
~209K SLoC