henrybetts / swift-webgpu

Swift bindings for WebGPU
MIT License
76 stars 3 forks source link

Cannot find headers #9

Open AryzenRS opened 1 week ago

AryzenRS commented 1 week ago

Hello!

I am attempting to use this package as per the directions, however, I get the error webgpu/webgpu.h file not found; I have attempted to add the include directory both via cSettings.headerSearchPath as well as publicHeadersPath in my Package.swift but neither allow it to recognize the header. I'm not sure what I'm doing wrong (or if it's appropriate to have put this in an issue since I don't think I've ever written an issue before)

henrybetts commented 5 days ago

I'm guessing this is because headerSearchPath doesn't allow you to specify an absolute path, and it also doesn't propagate to dependencies.

I've made some changes today, and my recommendation now is to install Dawn system-wide (i.e. to /usr/local). This should allow Swift to find it automatically, hopefully making the whole process a bit easier, at least until Dawn has some kind of official build/pkg-config.