winer 0.1.5

Inspect Wine runtimes, host OS details, and hosted processes
Documentation
#[cfg(windows)]
fn main() {
    if let Some(runtime) = winer::runtime() {
        println!("Running on Wine");
        println!("Version: {}", runtime.version_str().unwrap_or("N/A"));
        println!(
            "Build: {}",
            runtime
                .build_id_str()
                .transpose()
                .ok()
                .flatten()
                .unwrap_or("N/A")
        );

        println!(
            "Sysname: {}",
            runtime
                .host_sysname_str()
                .transpose()
                .ok()
                .flatten()
                .unwrap_or("N/A"),
        );
        println!(
            "Release: {}",
            runtime
                .host_release_str()
                .transpose()
                .ok()
                .flatten()
                .unwrap_or("N/A"),
        );

        if let Ok(info) = runtime.info() {
            println!();
            println!("General information");
            println!("Version: {}", info.version_str().unwrap_or("N/A"));
            println!("Build: {}", info.build_str().unwrap_or("N/A"));
            println!("Sysname: {}", info.sysname_str().unwrap_or("N/A"));
            println!("Release: {}", info.release_str().unwrap_or("N/A"));
        }
    } else {
        println!("Running on Windows.");
    }
}

#[cfg(not(windows))]
fn main() {
    eprintln!("This example only runs on Wine / Windows.")
}