Skip to content

Conversation

@TotoShampoin
Copy link

Reference to @filipcro's suggestion in #23, which I mentioned in #24

I will mention that, as it is right now, the extern structs are using the packed struct by themselves, instead of WGPUFlags. But since said packed structs are all backed by WGPUFlags, it still works.

Whether you'd prefer the WGPU structs to use raw WGPUFlags and use bit casts when converting the zig structs to wgpu structs or leave it as is, I'll leave it up to you.

@bronter
Copy link
Owner

bronter commented Jul 17, 2025

Since the packed structs evaluate to the same values as the flags, I don't think we need to bother with bitcasting them for WGPU structs, it's fine as-is.

@bronter
Copy link
Owner

bronter commented Jul 17, 2025

Perfect, thanks!

@bronter bronter merged commit c4e00d8 into bronter:idiomatic-zig Jul 17, 2025
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