From 9f863b6f872ca699d7e99b46eb6a716d2c171423 Mon Sep 17 00:00:00 2001 From: Bruce Mitchener Date: Mon, 29 Jan 2024 18:44:32 +0700 Subject: [PATCH] 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. --- build.rs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/build.rs b/build.rs index c4ff2512..49d80d6b 100644 --- a/build.rs +++ b/build.rs @@ -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)