#packaging #index #dependencies #crate #meta

crates-index

Library for retrieving and interacting with the crates.io index

18 releases (11 breaking)

0.12.1 Dec 10, 2018
0.12.0 Apr 28, 2018
0.11.0 Feb 10, 2018
0.10.0 May 26, 2017
0.1.2 May 27, 2015

#9 in Build Utils

Download history 614/week @ 2018-11-17 662/week @ 2018-11-24 580/week @ 2018-12-01 652/week @ 2018-12-08 525/week @ 2018-12-15 781/week @ 2018-12-22 1107/week @ 2018-12-29 595/week @ 2019-01-05 617/week @ 2019-01-12 700/week @ 2019-01-19 877/week @ 2019-01-26 613/week @ 2019-02-02 528/week @ 2019-02-09 769/week @ 2019-02-16 1015/week @ 2019-02-23

3,180 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

~9MB
~210K SLoC