vm-detect

Crates.iovm-detect
lib.rsvm-detect
version0.1.0
sourcesrc
created_at2023-09-01 12:57:58.178146
updated_at2023-09-01 12:57:58.178146
descriptionDetect if your rust code is running under a virtual machine (only for x86_64 and x86)
homepage
repositoryhttps://gitlab.com/polloloco/vm-detect
max_upload_size
id960882
size7,024
PolloLoco (polloloco)

documentation

README

Basic VM detection for x86 and x86_64

Usage:

use vm_detect::{vm_detect, Detection};

fn main() {
    // Run detection
    let detection = vm_detect();

    // Inspect detections
    if detection.contains(Detection::HYPERVISOR_BIT) {
        println!("Hypervisor bit set!");
    }
}
Commit count: 3

cargo fmt