Skip to content
This repository has been archived by the owner on Oct 13, 2022. It is now read-only.
/ whereis Public archive

Locate where a crate is located within a workspace.

License

Notifications You must be signed in to change notification settings

coriolinus/whereis

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

whereis that crate?

When working in large Rust codebases, one occasionally encounters repositories containing dozens or hundreds of individual crates. Rust knows where they all are, due to the definitions in Cargo.toml, but it's not always so obvious to the developer. This tool makes it easy to locate the actual path of a crate.

Usage Examples

Produce the path to a crate in the workspace:

substrate$ cargo whereis --relative sp-offchain
primitives/offchain

Produce the URL of a dependency:

substrate$ cargo whereis --url lazy_static
https://crates.io/crates/lazy_static

Produce either a local filesystem path or a URL if you're not sure:

substrate$ cargo whereis --force parity-scale-codec
https://crates.io/crates/parity-scale-codec

Installation

cargo install cargo-whereis