sev 7.1.0

Library for AMD SEV
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
// SPDX-License-Identifier: Apache-2.0

fn main() {
    use std::path::Path;

    // Add in configurations to be checked within the code.
    println!("cargo::rustc-check-cfg=cfg(host)");
    println!("cargo::rustc-check-cfg=cfg(guest)");

    if Path::new("/dev/sev").exists() {
        println!("cargo:rustc-cfg=host");
    }

    if Path::new("/dev/sev-guest").exists() {
        println!("cargo:rustc-cfg=guest");
    }
}