#packaging #index #dependencies #crate #meta

crates-index

Library for retrieving and interacting with the crates.io index

41 releases

0.16.5 Apr 12, 2021
0.16.4 Mar 24, 2021
0.16.2 Nov 15, 2020
0.15.0 May 31, 2020
0.1.2 May 27, 2015

#16 in Development tools

Download history 5232/week @ 2021-01-15 6192/week @ 2021-01-22 6060/week @ 2021-01-29 6922/week @ 2021-02-05 6921/week @ 2021-02-12 7750/week @ 2021-02-19 6464/week @ 2021-02-26 9074/week @ 2021-03-05 8564/week @ 2021-03-12 7893/week @ 2021-03-19 7811/week @ 2021-03-26 7202/week @ 2021-04-02 7525/week @ 2021-04-09 7733/week @ 2021-04-16 7316/week @ 2021-04-23 7477/week @ 2021-04-30

30,207 downloads per month
Used in 16 crates (10 directly)

Apache-2.0

44KB
987 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

~13MB
~320K SLoC