Skip to content

Commit

Permalink
Merge pull request #11 from arnabcs17b006/default_derive
Browse files Browse the repository at this point in the history
Default derive
  • Loading branch information
Wenzel committed Sep 1, 2020
2 parents 00edbd8 + 8b626cb commit d85f312
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
6 changes: 5 additions & 1 deletion build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
1 change: 1 addition & 0 deletions src/wrapper.h
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
#include <xenctrl.h>

0 comments on commit d85f312

Please sign in to comment.