Skip to content
This repository has been archived by the owner on Jun 5, 2020. It is now read-only.

Please support running standalone #12

Open
joshtriplett opened this issue Dec 25, 2016 · 4 comments
Open

Please support running standalone #12

joshtriplett opened this issue Dec 25, 2016 · 4 comments

Comments

@joshtriplett
Copy link

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.

@sfackler
Copy link
Owner

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".

@alexcrichton
Copy link

@sfackler you'd do something like this:

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 Summary with a dummy package id, one dependency (the one you're interested in), and no features.
  • Call resolve with this summary, no replacements, and a blank registry, probably a PackageRegistry

Does that make sense?

@sfackler
Copy link
Owner

Yep, thanks!

@equal-l2
Copy link

Hello, any update for this?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants