diff --git a/Cargo.toml b/Cargo.toml index 6084447..1790ca4 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -30,6 +30,7 @@ formatter = ["alloc", "full-decoder"] encoder = ["alloc", "full-decoder"] serialization = ["serde", "bitflags/serde"] nolibc = [] +windows-kernel = [] [[example]] name = "pattern" diff --git a/build.rs b/build.rs index 707439c..a6e1102 100644 --- a/build.rs +++ b/build.rs @@ -55,6 +55,10 @@ fn build_library() { println!("cargo:rustc-link-lib=static=Zydis"); println!("cargo:rustc-link-lib=static=Zycore"); + + if cfg!(feature = "windows-kernel") { + println!("cargo:rustc-link-lib=BufferOverflowK"); + } } fn main() {