winer 0.1.5

Inspect Wine runtimes, host OS details, and hosted processes
Documentation

winer

Library for inspecting Wine environments

license crates.io version docs.rs documentation

Features

  • Unix-like systems: scan Wine-hosted processes and inspect their setup.
  • Windows: query Wine runtime information and host OS details.

Usage

Scan hosted processes (on Unix-like systems)

use winer::host::Scanner;

let mut scanner = Scanner::new();
let scan = scanner.scan();

for universe in scan.universes() {
    if let Some(server) = universe.server() {
        println!("Server ({}) @ {}", server.pid(), server.prefix().display());
    } else {
        println!("No Server");
    }

    for process in universe.processes() {
        println!("Process: {} ({})", process.image().display(), process.pid());
    }
}

Probe Wine runtime (on Windows)

if let Some(runtime) = winer::runtime() {
    println!("Wine version: {}", runtime.version_str().unwrap_or("N/A"));
    println!(
        "Build: {}",
        runtime.build_id_str().transpose().ok().flatten().unwrap_or("N/A")
    );
    println!(
        "Host sysname: {}",
        runtime.host_sysname_str().transpose().ok().flatten().unwrap_or("N/A")
    );
    println!(
        "Host release: {}",
        runtime.host_release_str().transpose().ok().flatten().unwrap_or("N/A")
    );
} else {
    println!("Wine runtime is not present.");
}