#wine #windows #set #interface #system #run #applications #match #systems #different

wincompatlib

Set of interfaces to run windows applications on unix-like systems using Wine

12 unstable releases (3 breaking)

new 0.4.1 Mar 18, 2023
0.4.0 Mar 15, 2023
0.3.2 Mar 15, 2023
0.2.2 Mar 7, 2023
0.1.2 Sep 29, 2022

#55 in Windows APIs

Download history 9/week @ 2022-11-27 89/week @ 2022-12-04 12/week @ 2022-12-11 74/week @ 2022-12-18 29/week @ 2022-12-25 13/week @ 2023-01-01 14/week @ 2023-01-08 28/week @ 2023-01-15 83/week @ 2023-01-22 116/week @ 2023-01-29 77/week @ 2023-02-05 92/week @ 2023-02-12 88/week @ 2023-02-19 170/week @ 2023-02-26 288/week @ 2023-03-05 183/week @ 2023-03-12

745 downloads per month

MIT license

58KB
1K SLoC

🦀 wincompatlib

Rust library that contains a set of interfaces to run windows applications on unix-like systems using Wine

Features:

  • Different wine builds
  • Can create wine prefixes & run applications
  • Support DXVK installing, uninstalling, applied version parsing (dxvk)
  • Has bundles system for special wine builds (wine-bundles)
  • Has Proton support (wine-proton)

Examples

Run cmd.exe using system wine

use wincompatlib::prelude::*;

// Run cmd.exe using system wine
Wine::default().run("cmd");

// Ask for cmd's help
let child = Wine::default().run_args(["cmd", "/c", "help"]).unwrap();

println!("Help: {}", &String::from_utf8_lossy(&child.wait_with_output().unwrap()));

Print wine version

use wincompatlib::prelude::*;

// Print wine version
println!("Wine version: {:?}", Wine::default().version().unwrap());

Run cmd.exe using custom wine, and then stop it

use wincompatlib::prelude::*;

let wine = Wine::from_binary("/path/to/wine");

// Run cmd.exe using custom wine
// and then stop it
wine.run("cmd");
wine.stop_processes(true);

Print DXVK version

// Requires "dxvk" feature (enabled by default)
use wincompatlib::prelude::*;

match Dxvk::get_version("/path/to/prefix") {
    Ok(Some(version)) => println!("DXVK applied: {}", version),
    Ok(None) => println!("DXVK is not applied"),
    Err(err) => eprintln!("Failed to get DXVK version: {}", err)
}

Install DXVK

// Requires "dxvk" feature (enabled by default)
use wincompatlib::prelude::*;

Wine::default()
    .install_dxvk("/path/to/dxvk-x.y.z", InstallParams::default())
    .expect("Failed to install DXVK");

Author: Nikita Podvirnyy

Licensed under MIT

No runtime deps