I've got a Zig question if anyone out there happens to know.

I'm wrapping the wgpu_native library into a zig build system package like in the screenshot. This works and can be consumed by another project.

However, I want to _also_ package a file (include/webgpu/webgpu.h) along for the consuming project to be able to use. (I have another wrapped C library that uses webgpu as well that needs to include that header when building.) How would I do that?

#zig #ziglang

zig-curl/libs/curl.zig at b22007729c714936a2f85106a2fd27e0851ad567 · jiacai2050/zig-curl

Zig bindings for libcurl. Contribute to jiacai2050/zig-curl development by creating an account on GitHub.

GitHub
@liujiacai Thanks, but I'm doing this but the include files aren't in the folder the path resolves to (inside zig-cache)

@SonnyBonds
How could this be possible?

You need to install those headers into package, so other projects could use it.

@liujiacai I couldn't fit it in my post but wrote in a reply that I'd tried using "installHeader" as well. Turned out it actually did work, and I just didn't consume it properly in the receiving end. Adding it to a library that I used with linkLibrary set up the include paths properly automatically.