cargo-tree icon indicating copy to clipboard operation
cargo-tree copied to clipboard

Add JSON output capabilities

Open Twey opened this issue 6 years ago • 3 comments

I needed this to be able to output JSON for parsing elsewhere.

Twey avatar Oct 17 '17 16:10 Twey

Have you taken a look at cargo metadata? That's the main interface for interacting programmatically with Cargo.

sfackler avatar Oct 18 '17 03:10 sfackler

Unfortunately cargo metadata doesn't output any information on resolved features, which I need, and also doesn't output a tree, which is handy for my use-case. While I could munge it into the right format, it seemed like a better option to reuse cargo-tree, since that's basically what it does already. I don't mind keeping this local if you don't want machine-friendly formats in cargo-tree, though.

Twey avatar Oct 20 '17 16:10 Twey

What do you mean by resolved features?

I would kind of like to keep this project focused on user-facing output.

sfackler avatar Oct 24 '17 19:10 sfackler