-
Notifications
You must be signed in to change notification settings - Fork 30
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
Refactor code generation for public API #135
Conversation
.. autodata:: wgpu.base.apidiff | ||
:annotation: Differences of base API: | ||
|
||
|
||
.. autodata:: wgpu.backends.rs.apidiff | ||
:annotation: Differences of rs backend: | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm really happy about this part. The codegen enforces exactly the WebGPU API, except where methods are decorated. And all decorations are collected and end up here in the docs!
Looks great! I don't have time to go through it with a fine comb, sorry. I trust we will identify any issues soon enough anyway :) |
Yeah, these changes are somehow hard to review. We could go over the code in a meeting once it has progressed further. |
This is the first step in the codegen refactoring in #135. It changes how the API is created. The public API
base.py
is fully defined from the WebGPU spec (IDL), not from the C header. The backend implementationsrs.py
is defined frombase.py
. Any deviations from the "reference" API must be marked with decorators, making them explicit (and document-able).I'll focus on handling of the C-header in later PR(s).