| Crates.io | cargo-const |
| lib.rs | cargo-const |
| version | 0.2.1 |
| created_at | 2025-11-08 14:22:28.808473+00 |
| updated_at | 2025-12-05 07:03:44.611684+00 |
| description | Crate compatibility helper |
| homepage | |
| repository | https://github.com/abelmarnk/cargo-const |
| max_upload_size | |
| id | 1922906 |
| size | 93,558 |
cargo-const is a command-line tool for analyzing crate compatibility in Rust projects. It helps you find versions of a crate that are compatible with your project's dependencies by inspecting the Cargo.lock file.
Install via Cargo:
cargo install cargo-const
compatFinds compatible versions of a crate based on your project's dependencies.
dependency – The crate to check for compatibility (required).-v, --verbose – Enable verbose logging.-i, --include-yanked – Include yanked versions in the results.-c, --count <COUNT> – Number of versions to list. Can be a number or "all" (default: 5).-p, --path <PATH> – Path to your Cargo.lock file (default: Cargo.lock).-m, --max-version <VERSION> – Maximum Rust version supported by the crate.Find all compatible versions of the indexmap crate with verbose logging enabled:
user:~$ cargo-const compat indexmap --count all --verbose
Info: Cache successfully created at "/home/user/.local/share/cargo-const-0.2.0/dependencies/toml_edit/0.23.7"
Info: Cache successfully created at "/home/user/.local/share/cargo-const-0.2.0/versions/indexmap"
Compatible versions found:
2.12.0 min-rust-version = 1.82
2.11.4 min-rust-version = 1.63
Cargo.lock.Contributions are welcome! Fork the repository, make your changes, and open a pull request.
MIT License