Expand description
§VMAware-rs
A cross-platform Rust library for virtual machine detection. Port of VMAware (C++).
§Quick Start
use vmaware::VM;
fn main() {
if VM::detect(None) {
println!("Virtual machine detected!");
} else {
println!("Running on baremetal");
}
println!("VM name: {}", VM::brand(None));
println!("VM type: {}", VM::vm_type(None));
println!("VM certainty: {}%", VM::percentage(None));
}Modules§
- brands
- Official aliases for VM brands. Using constants avoids typos and enables pointer-based comparison.
- cpu
- CPU operations module — wraps CPUID and related low-level CPU queries.
- engine
- Core scoring engine module. Manages the technique table, brand scoreboard, and orchestrates running all detections.
- flags
- memo
- Memoization / caching module. Caches technique results, brand strings, CPU brand, and other computed values to avoid re-running expensive detection logic.
- techniques
- VM detection techniques organized by platform.
- util
- Utility functions used by VM detection techniques. Includes file I/O, registry access, process checking, OS queries, etc.
Structs§
- VM
- Main VM detection interface. All methods are static — no instantiation needed.
- VMAware
Result - Convenience struct that holds all detection results at once.