https://github.com/frewsxcv/rust-crates-index
Rust library for retrieving and interacting with the crates.io index
https://github.com/frewsxcv/rust-crates-index
crates-io rust
Last synced: 6 months ago
JSON representation
Rust library for retrieving and interacting with the crates.io index
- Host: GitHub
- URL: https://github.com/frewsxcv/rust-crates-index
- Owner: frewsxcv
- License: apache-2.0
- Created: 2015-05-27T04:18:42.000Z (about 11 years ago)
- Default Branch: master
- Last Pushed: 2024-04-08T06:34:50.000Z (about 2 years ago)
- Last Synced: 2024-04-14T13:51:51.652Z (about 2 years ago)
- Topics: crates-io, rust
- Language: Rust
- Homepage: https://docs.rs/crates-index/
- Size: 429 KB
- Stars: 69
- Watchers: 5
- Forks: 37
- Open Issues: 7
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
# crates-index
[](https://crates.io/crates/crates-index)
Library for retrieving and interacting with the [crates.io registry index](https://doc.rust-lang.org/cargo/reference/registry-index.html) using either the `git` or `sparse` protocol.
The index contains metadata for all Rust libraries and programs published on crates.io: their versions, dependencies, and feature flags.
[Documentation](https://docs.rs/crates-index/)
## Example
```rust
let index = crates_index::GitIndex::new_cargo_default()?;
for crate_releases in index.crates() {
let _ = crate_releases.most_recent_version(); // newest version
let crate_version = crate_releases.highest_version(); // max version by semver
println!("crate name: {}", crate_version.name());
println!("crate version: {}", crate_version.version());
}
```
## Changelog
Please find the changelog in [CHANGELOG.md](https://github.com/frewsxcv/rust-crates-index/blob/master/CHANGELOG.md).
## Similar crates
- [`tame-index`](https://github.com/EmbarkStudios/tame-index) - a hard fork with many improvements and advantages
- [`crates_io_api`](https://github.com/theduke/crates_io_api) - a way to talk to the HTTP API of crates.io
## License
Licensed under version 2 of the Apache License