Rust bindings for VMAware, a cross-platform C++ framework for virtual machine detection.
The package is published as vmaware-rs, while the Rust library is imported as vmaware.
[dependencies]
vmaware-rs = { git = "https://github.com/MarcelDev/vmaware-rs.git" }This crate builds a small C++17 wrapper around the vendored VMAware header. A working C++ compiler is required.
fn main() -> Result<(), vmaware::Error> {
println!("is vm: {}", vmaware::detect()?);
println!("brand: {}", vmaware::brand()?);
println!("type: {}", vmaware::vm_type()?);
println!("conclusion: {}", vmaware::conclusion()?);
println!("percentage: {}%", vmaware::percentage()?);
Ok(())
}You can run a small example:
cargo run --example basicLicensed under the MIT License, matching upstream VMAware. The vendored VMAware source is included under deps/vmaware as a Git submodule.