Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

wgpu.h: Don't require preprocessing to use. #359

Merged
merged 1 commit into from
Jan 27, 2024

Conversation

waywardmonkeys
Copy link
Contributor

Right now, wgpu.h can be included directly and it then includes webgpu-headers/webgpu.h. This is altered during creation of a distribution package to remove the "webgpu-headers", but by adding ffi/webgpu-headers to the include search path, we can avoid having to preprocess the wgpu.h.

@waywardmonkeys
Copy link
Contributor Author

I ran across this while working on some cmake stuff regarding #251

cc: @eliemichel

Copy link
Collaborator

@rajveermalviya rajveermalviya left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great work!
Apart from one nit LGTM.

build.rs Outdated Show resolved Hide resolved
Right now, `wgpu.h` can be included directly and it then includes
`webgpu-headers/webgpu.h`. This is altered during creation of a
distribution package to remove the `"webgpu-headers"`, but by
adding `ffi/webgpu-headers` to the include search path, we can
avoid having to preprocess the `wgpu.h`.
@waywardmonkeys waywardmonkeys force-pushed the no-preprocessing-wgpu.h branch from ce65609 to 95e4a6b Compare January 27, 2024 13:50
@waywardmonkeys
Copy link
Contributor Author

@rajveermalviya Hopefully good to go now!

Copy link
Collaborator

@rajveermalviya rajveermalviya left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks! LGTM

Verified locally that the generated package remains the same.

@rajveermalviya rajveermalviya merged commit cd9d6a2 into gfx-rs:trunk Jan 27, 2024
16 checks passed
@waywardmonkeys waywardmonkeys deleted the no-preprocessing-wgpu.h branch January 27, 2024 14:08
@waywardmonkeys
Copy link
Contributor Author

Thanks… another Pr coming up soon!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants