-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Extern definitions for WebGPU #4145
Comments
Link for easy reference: https://github.com/emscripten-core/emscripten/blob/fb4bdc78cf3b99d634838418882f199e18309a5c/src/closure-externs/webgpu-externs.js Thanks for the offer. On first glance I'd say they look nice. I'm going to check with the team if we want to include them as is. |
If it helps, both Safari and Firefox have made strong signals about the API - Chrome shipped with positive signals from other browsers (the only caveat being that they hadn't/haven't finished implementing). |
We talked internally. We'd rather not include the externs with JSCompiler by default, yet, because the API is currently only live Chrome. Related: We're also thinking about generating externs using tsickle from TypeScript typings. That way we'd get better about adding new browser APIs to externs. But at the same time we'd only get them once at least 2 browser engines implement them, since that seems to be TS' policy. I hope that makes sense. I'd kinda like to keep the issue open, though. We do need to add WebGPU externs eventually. |
Sounds good! We're happy to use our own externs in Emscripten for now. Hopefully if anyone is searching they'll find this issue and be able to copy them. We're currently maintaining TypeScript types for WebGPU outside of upstream TypeScript: https://github.com/gpuweb/types |
Closure doesn't yet have extern definitions for WebGPU.
Over in Emscripten, we are finally switching to externs instead of doing
["this"]
everywhere (except everywhere we forgot and so it's broken).emscripten-core/emscripten#21144
There you can see some barebones externs I generated from the WebGPU spec's WebIDL. I think it's enough for minification to work correctly(?) but it doesn't provide much else - no function arguments, in particular.
Would there be interest in bringing this into Closure as-is, or would it need more complete definitions?
The text was updated successfully, but these errors were encountered: