Skip to content

Commit

Permalink
bindgen: Only bind WGPU.* and wgpu.*. (#361)
Browse files Browse the repository at this point in the history
The bindings only need to include things from the WGPU API,
not stuff from the headers that they happen to include from
the compiler and libc.
  • Loading branch information
waywardmonkeys authored Jan 29, 2024
1 parent 612b670 commit 9f863b6
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,8 @@ fn main() {
.header("ffi/wgpu.h")
.clang_arg("-Iffi/webgpu-headers")
.parse_callbacks(Box::new(bindgen::CargoCallbacks::new()))
.allowlist_item("WGPU.*")
.allowlist_item("wgpu.*")
.blocklist_function("wgpuGetProcAddress")
.prepend_enum_name(false)
.size_t_is_usize(true)
Expand Down

0 comments on commit 9f863b6

Please sign in to comment.