You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
aya/aya-tool/src/bindgen.rs

24 lines
640 B
Rust

use bindgen::{self, Builder, EnumVariation};
pub fn user_builder() -> Builder {
bindgen::builder()
.use_core()
.layout_tests(false)
.generate_comments(false)
.prepend_enum_name(false)
.default_enum_style(EnumVariation::Rust {
non_exhaustive: false,
})
}
pub fn bpf_builder() -> Builder {
bindgen::builder()
.use_core()
.ctypes_prefix("::aya_bpf::cty")
.layout_tests(false)
.generate_comments(false)
.clang_arg("-Wno-unknown-attributes")
.default_enum_style(EnumVariation::ModuleConsts)
.prepend_enum_name(false)
}