| Crates.io | build_details |
| lib.rs | build_details |
| version | 0.1.2 |
| created_at | 2018-07-27 16:51:21.703817+00 |
| updated_at | 2018-07-30 19:54:25.348734+00 |
| description | build.rs helper that provides build information at runtime |
| homepage | |
| repository | https://github.com/tecywiz121/build_details |
| max_upload_size | |
| id | 76220 |
| size | 38,541 |
build_details is a code generation helper that provides build information
at runtime.
There are two steps to adding build_details to a crate:
build.rs; andInvoking build_details is as simple as adding the following snippet to
build.rs:
extern crate build_details;
fn main() {
build_details::BuildDetails::default()
.generate("build_details.rs")
.unwrap();
}
In src/lib.rs:
pub mod build_details {
include!(concat!(env!("OUT_DIR"), "/build_details.rs"));
}
BuildDetail::CfgUsing BuildDetail::Cfg requires a runtime dependency on phf.
In Cargo.toml, add:
[dependencies]
phf = "0.7"
In src/lib.rs or src/main.rs:
extern crate phf;
Licensed under the Mozilla Public License, Version 2.0.
Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the Covered Software by you, as defined in the Mozilla Public License, shall be licensed as above, without any additional terms or conditions.