2 releases
Uses old Rust 2015
0.0.2 | Dec 1, 2016 |
---|---|
0.0.1 | Dec 1, 2016 |
#43 in #formatted
58 downloads per month
4KB
61 lines
Build
JSON formatted application build details provided by the Cargo.toml file.
Usage
Add the following to your Cargo.toml file (Edit the version if needed.):
build = "*"
Methods
build_as_json() -> String
Returns a JSON response formatted to the 1.1 specification that is in a String format for transit.
Example
extern crate build;
fn main(){
let details = build::build_as_json();
println!("{}", details);
}
To see it in action run (I pipe to jq
to make it pretty!):
cargo run | jq
TODO
- Encapsulate environment request with
try!
and alternate response structures when some cannot be obtained. - Provide string response for all
env
request types to Cargo.toml files offer. - ... Suggestions?
Dependencies
~225KB