Extracts the current rust compiler information.
This library main goal is to provide development/build tools such as cargo-make the needed information on the current rust installation and setup.
Simply include the library and invoke the get function to pull all info as follows:
````rust extern crate rust_info;
fn main() { let rustinfo = rustinfo::get();
println!("Version: {}", rust_info.version.unwrap());
println!("Channel: {:#?}", rust_info.channel.unwrap());
println!("Target Arch: {}", rust_info.target_arch.unwrap_or("unknown".to_string()));
println!("Target Env: {}", rust_info.target_env.unwrap_or("unknown".to_string()));
println!("Target OS: {}", rust_info.target_os.unwrap_or("unknown".to_string()));
println!("Target Pointer Width: {}", rust_info.target_pointer_width.unwrap_or("unknown".to_string()));
println!("Target Vendor: {}", rust_info.target_vendor.unwrap_or("unknown".to_string()));
} ````
In order to use this library, just add it as a dependency:
ini
[dependencies]
rust_info = "*"
See full docs at: API Docs
| Date | Version | Description | | ----------- | ------- | ----------- | | 2018-05-18 | v0.1.13 | Maintenance | | 2017-10-10 | v0.1.1 | Update exposed types. | | 2017-10-10 | v0.1.0 | Initial release. |
Developed by Sagie Gur-Ari and licensed under the Apache 2 open source license.