Skip to content

Commit 9f863b6

Browse files
bindgen: Only bind WGPU.* and wgpu.*. (#361)
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.
1 parent 612b670 commit 9f863b6

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

build.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,8 @@ fn main() {
4545
.header("ffi/wgpu.h")
4646
.clang_arg("-Iffi/webgpu-headers")
4747
.parse_callbacks(Box::new(bindgen::CargoCallbacks::new()))
48+
.allowlist_item("WGPU.*")
49+
.allowlist_item("wgpu.*")
4850
.blocklist_function("wgpuGetProcAddress")
4951
.prepend_enum_name(false)
5052
.size_t_is_usize(true)

0 commit comments

Comments
 (0)