cargo_metadata

Structured access to the output of cargo metadata. Usually used from within a cargo-* executable.

Build Status crates.io

Documentation - contains examples of use with std::env::args, docopt, and clap.