diff --git a/build.rs b/build.rs index bd1de79..4d4051b 100644 --- a/build.rs +++ b/build.rs @@ -13,11 +13,15 @@ fn main() { // bindings for. .header(XEN_HEADERS_WRAPPER) // Keep C's enums as Rust's enums. - .default_enum_style(bindgen::EnumVariation::Rust{ non_exhaustive: false }) + .default_enum_style(bindgen::EnumVariation::Rust { + non_exhaustive: false, + }) // Disable data layout tests. .layout_tests(false) // Run rustfmt on the bindings .rustfmt_bindings(true) + //initialize structs with default values + .derive_default(true) // Finish the builder and generate the bindings. .generate() // Unwrap the Result and panic on failure. diff --git a/src/wrapper.h b/src/wrapper.h index 4c31416..3236c78 100644 --- a/src/wrapper.h +++ b/src/wrapper.h @@ -1 +1,2 @@ #include +