moon-driver-utils 0.1.0

Windows Kernel Utils
use std::io::Write;
use std::{
    env,
    fs::OpenOptions,
    path::{Path, PathBuf},
};

fn _p(s: String) {
    let mut file = OpenOptions::new()
        .create(true)
        .append(true)
        .open("output.txt")
        .expect("Unable to open file");

    writeln!(file, "{}", s).expect("Unable to write to file");
}

fn main() -> Result<(), wdk_build::ConfigError> {
    // other c/c++ library dependences
    let root = PathBuf::from(env::var_os("CARGO_MANIFEST_DIR").unwrap());

    println!(
        "cargo:rustc-link-search=native={}",
        Path::new(&root).join("lib").display()
    );
    println!("cargo::rustc-link-lib=distorm35");
    println!("cargo::rustc-link-lib=SehLib");

    // p(format!("root:{:?}", Path::new(&root).join("lib").display()));

    Ok(())
}