bindgen.rs 635 B

1234567891011121314151617181920212223
  1. use bindgen::{Builder, EnumVariation};
  2. pub fn user_builder() -> Builder {
  3. bindgen::builder()
  4. .use_core()
  5. .layout_tests(false)
  6. .generate_comments(false)
  7. .prepend_enum_name(false)
  8. .default_enum_style(EnumVariation::Rust {
  9. non_exhaustive: false,
  10. })
  11. }
  12. pub fn bpf_builder() -> Builder {
  13. bindgen::builder()
  14. .use_core()
  15. .ctypes_prefix("::aya_ebpf::cty")
  16. .layout_tests(false)
  17. .generate_comments(false)
  18. .clang_arg("-Wno-unknown-attributes")
  19. .default_enum_style(EnumVariation::ModuleConsts)
  20. .prepend_enum_name(false)
  21. }