Library for retrieving and interacting with the crates.io registry git-based index.
```rust let index = cratesindex::Index::newcargo_default()?;
for cratereleases in index.crates() { let _ = cratereleases.latestversion(); // any version most recently published let crateversion = cratereleases.highestversion(); // max version by semver println!("crate name: {}", crateversion.name()); println!("crate version: {}", crateversion.version()); } ```
BareIndex
and BareIndexRepo
have become the Index
.Index::new_cargo_default()?
is the preferred way of accessing the index. Use with_path()
to clone to a different directory.retrieve()
or exists()
. It's always retrieved and always exists.retrieve_or_update()
is just update()
.highest_version()
returns crate metadata rather than just the version number. Call highest_version().version().parse()
to get semver::Version
.crate_index_paths()
, because there are no files any more. Use crate_
to get individual crates.Licensed under version 2 of the Apache License