cargo-tree
cargo-tree copied to clipboard
Please support running standalone
cargo-tree expects to find a local Cargo.toml file. Please consider adding support for running on a named package directly from the registry: cargo tree somecrate.
This seems reasonable.
@alexcrichton any pointers on where to look in the cargo APIs? I need "download this pkgspec and well me where its directory is".
@sfackler you'd do something like this:
- You'd create a
Config - You'd create a
SourceId - Create a
RegistrySource - Update the registry source.
- Create a
Dependencymatching the crate you're curious about - Query the registry source
That'll give you one layer and you could apply that recursively.
If, instead, you'd like to work with a Resolve (like you're probably doing today), it'd be a little different:
- Create a synthetic
Summarywith a dummy package id, one dependency (the one you're interested in), and no features. - Call
resolvewith this summary, no replacements, and a blank registry, probably aPackageRegistry
Does that make sense?
Yep, thanks!
Hello, any update for this?