Crates.io | wincompatlib |
lib.rs | wincompatlib |
version | 0.7.5 |
source | src |
created_at | 2022-09-25 18:14:30.127879 |
updated_at | 2024-09-18 20:01:54.08006 |
description | Set of interfaces to run windows applications on unix-like systems using Wine |
homepage | |
repository | |
max_upload_size | |
id | 673751 |
size | 93,910 |
Rust library that contains a set of interfaces to run windows applications on unix-like systems using Wine
Features:
dxvk
)wine-bundles
)wine-proton
)winetricks
(same called feature)wine-fonts
feature)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()));
use wincompatlib::prelude::*;
// Print wine version
println!("Wine version: {:?}", Wine::default().version().unwrap());
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);
// 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)
}
// 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 Podvirnyi
Licensed under MIT