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

Making language bindings portable over different versions of webgpu.h #202

Open
kainino0x opened this issue Jul 28, 2023 · 2 comments
Open
Labels
extensibility Adding features without breaking API changes non-breaking Does not require a breaking change (that would block V1.0)

Comments

@kainino0x
Copy link
Collaborator

webgpu.h is getting standardized, but will gain features over time. Meanwhile, language bindings like Dawn's C++ bindings will want to be portable over webgpu.h. But this means that if, say, Dawn's C and C++ headers gain feature X, but wgpu-native's C and the proposed Rust-on-C bindings gain feature Y, then those bindings layers won't be portable to the other implementation's C header.

  • Maybe webgpu.h should expose macros saying which new features it has (or what version it is), so bindings in other languages can expose the same bits?
  • Maybe webgpu.h should become fixed and new things should be in new headers?
  • Maybe webgpu.h should be ABI-stable so the bindings can bundle their own webgpu.h while still working on other implementations? (not sure this is possible - I think it might prevent mixed use of the C and C++ APIs for example)
@kainino0x kainino0x added the extensibility Adding features without breaking API changes label Aug 19, 2023
@kainino0x
Copy link
Collaborator Author

Maybe this can be done on an ad-hoc basis, where, say, Dawn generates two versions of its C++ bindings - one for Dawn, and one for some unnamed snapshot of a subset of webgpu.h that we know is supported where we need it. So those bindings would just take an implicit dependency on whatever was in that snapshot.

@kainino0x
Copy link
Collaborator Author

kainino0x commented Dec 21, 2023

Dec 21 meeting

  • (discussion)
  • Probably fine to not solve this before we do ABI compatibility

@kainino0x kainino0x added the non-breaking Does not require a breaking change (that would block V1.0) label Dec 21, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
extensibility Adding features without breaking API changes non-breaking Does not require a breaking change (that would block V1.0)
Projects
None yet
Development

No branches or pull requests

1 participant