swift-webgpu icon indicating copy to clipboard operation
swift-webgpu copied to clipboard

Cannot find headers

Open AryzenRS opened this issue 1 year ago • 1 comments

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)

AryzenRS avatar Jun 24 '24 06:06 AryzenRS

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.

henrybetts avatar Jul 01 '24 00:07 henrybetts

The new build instructions are significantly easier. For future reference perhaps also mention which Windows directories to use (if it would work with Win). I have a separate build problem now but I'll make a new issue for it.

AryzenRS avatar Oct 27 '24 17:10 AryzenRS