Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -266,6 +266,11 @@ fn generate_bindings(out_dir: &Path, include_dir: &Path) {
.allowlist_function("nghttp2_.*")
.allowlist_type("nghttp2_.*")
.allowlist_var("NGHTTP2_.*")
// Generate enum constants with consistent types across platforms.
// Without this, C enums become i32 on MSVC (C standard: enum is int)
// but u32 on GCC/Clang (where the underlying type matches the values).
.default_enum_style(bindgen::EnumVariation::Consts)
.translate_enum_integer_types(true)
// Opaque types that should not derive Copy
.opaque_type("nghttp2_session")
.opaque_type("nghttp2_rcbuf")
Expand Down
Loading