Skip to content

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

Merged
rajveermalviya merged 1 commit into
gfx-rs:trunkfrom
waywardmonkeys:no-preprocessing-wgpu.h
Jan 27, 2024
Merged

wgpu.h: Don't require preprocessing to use.#359
rajveermalviya merged 1 commit into
gfx-rs:trunkfrom
waywardmonkeys:no-preprocessing-wgpu.h

Conversation

@waywardmonkeys

Copy link
Copy Markdown
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
Copy Markdown
Contributor Author

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

cc: @eliemichel

@rajveermalviya rajveermalviya left a comment

Copy link
Copy Markdown
Collaborator

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.

Comment thread build.rs
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
Copy Markdown
Contributor Author

@rajveermalviya Hopefully good to go now!

@rajveermalviya rajveermalviya left a comment

Copy link
Copy Markdown
Collaborator

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
@waywardmonkeys
waywardmonkeys deleted the no-preprocessing-wgpu.h branch January 27, 2024 14:08
@waywardmonkeys

Copy link
Copy Markdown
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