Ok, a Zig follow up... I managed to get the headers included properly, but now I'm having trouble passing a prebuilt library on.

I've seen suggestions that it can be added as an object file with e.g:

lib.addObjectFile(wgpu_lib.path("lib/libwgpu_native.a"));

This does seems to kind of repack it into a new library, of which Zig itself is saying "not an ELF file" when I try to use it. ("file" and "readelf" say that it _is_ and ELF, but it's different from the original lib.)

>>

#zig #ziglang

Ideally I'd just export the existing library as is to be linked in downstream projects with linkLibrary, but I'm not sure this is possible? Feels like it should be.

This project, which does pretty much the same thing that I'm doing now, uses addObjectFile. I've successfully used that project up until now, so I guess that _should_ work and is the way to go. I wonder why it doesn't like the resulting library when I do it. The only obvious difference I can see is that their module has actual Zig code in it wrapping wgpu, while mine is a pure translation of the C header.

https://github.com/bronter/wgpu_native_zig/blob/main/build.zig

Actually now that I look closer at it, that one does both. And I've somewhat forgotten why I didn't want to use it. 😬