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

wgpu_hal rules are not documented #4098

Open
jimblandy opened this issue Aug 29, 2023 · 0 comments
Open

wgpu_hal rules are not documented #4098

jimblandy opened this issue Aug 29, 2023 · 0 comments
Labels
area: documentation Documentation for crate items, public or private

Comments

@jimblandy
Copy link
Member

The fundamental premise of wgpu is that wgpu_core is responsible for validation and upholding invariants, so that wgpu_hal backends can remain simple: traits in wgpu_hal have safety conditions that wgpu_core ensures.

These safety conditions are poorly documented, if at all. The documentation for an unsafe function should have a "Safety" section explaining what the function requires of its callers.

This doesn't need to be as exhaustive or as detailed as the endless VUIDs in the 3000-page Vulkan spec. We can focus on wgpu_core contributors as our audience, and worry about giving them the background and special notes they need to make sense of the hoops wgpu_core is jumping through.

This should be an incremental process, not a monster PR. Please do cite this issue in PRs, but until wgpu_hal is fully documented, please don't use "Fixes #nnn" or an equivalent.

@jimblandy jimblandy added the area: documentation Documentation for crate items, public or private label Aug 29, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: documentation Documentation for crate items, public or private
Projects
None yet
Development

No branches or pull requests

1 participant