#wine #interface #applications #unix #run #systems #dxvk

wincompatlib

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

20 releases (6 breaking)

0.7.4 Oct 20, 2023
0.7.3 Jun 14, 2023
0.6.1 Jun 6, 2023
0.4.1 Mar 18, 2023
0.1.2 Sep 29, 2022

#190 in Unix APIs

Download history 113/week @ 2024-03-24 135/week @ 2024-03-31 64/week @ 2024-04-07 62/week @ 2024-04-14 522/week @ 2024-04-21 76/week @ 2024-04-28 117/week @ 2024-05-05 67/week @ 2024-05-12 132/week @ 2024-05-19 153/week @ 2024-05-26 129/week @ 2024-06-02 80/week @ 2024-06-09 130/week @ 2024-06-16 157/week @ 2024-06-23 270/week @ 2024-06-30 108/week @ 2024-07-07

678 downloads per month
Used in 2 crates

MIT license

87KB
1.5K 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)
  • Integrates with winetricks (same called feature)
  • Can install Microsoft Corefonts (wine-fonts feature)

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

Dependencies

~3–13MB
~162K SLoC