Elektrine lite

← Feed

@kristoff@hachyderm.io

Post #1215539

2026-03-07 18:03 UTC

@SonnyBonds usually if you're going down that path you just do `mod.linkLibrary(wgpu_dep.artifact("wgpu"))` and that also adds the include paths, but if you want only the header file that's one way. Another is to do `mod.addIncludePath(wgpu_dep.path("path/to/headers")`

Replies (1)

  • @kristoff@hachyderm.io 2026-03-07 18:06

    @SonnyBonds correction, since in your case wgpu_lib is the upstream project, then you would have to do something along the lines of `wgpu_dep.builder.dependencies("wgpu_lib", .{})`. This is the super manual version where you reach for your dep's dependenncies. There are less invasive methods where you expose a path to consumers (similarly to how you can expose modules and artifacts) but at this point your method seems preferable (if you want only the header files, if you want the full lib you can just linkLibrary).

    Open ##1215540