summaryrefslogtreecommitdiffstats
path: root/vendor/os_info/examples/print_version.rs
blob: 0047fbcc2fa16e7470a7c916aed40ae13c7023a5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
fn main() {
    let info = os_info::get();

    // Print full information:
    println!("OS information: {}", info);

    // Print information separately:
    println!("Type: {}", info.os_type());
    println!("Version: {}", info.version());
    println!("Edition: {:?}", info.edition());
    println!("Codename: {:?}", info.codename());
    println!("Bitness: {}", info.bitness());
}