Skip to content

Assortment of Docs and Understandability Improvements #7931

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

Merged

Conversation

cwfitzgerald
Copy link
Member

Description

Sorry for the number of commits at once, this was a series of "let me touch that up right quick" stuff which is completely standalone and easy enough to review commit by commit.

All the hal interop stuff is made more difficult by a lack of documentation, so this is a bit of an effort to improve the docs for both as_hal and the crate in general. This was all guided by how the docs are built.

Notable changes:

  • All hal interop methods in wgpu now explicitly link the corresponding hal types depending on the backend, helping navigate the sea of types.
  • Removed wgpu_core::hal_api::HalApi. It wasn't really adding anything and could be easily pushed down to wgpu_hal. This vastly improves the docs output of generic functions, as they no longer link to a random trait with no docs. Also generally reduces the complexity in the wgpu world.

Squash or Rebase?

Rebase

Checklist

  • Run cargo fmt.
  • Run taplo format.
  • Run cargo clippy --tests. If applicable, add:
    • --target wasm32-unknown-unknown
  • Run cargo xtask test to run tests.
  • If this contains user-facing changes, add a CHANGELOG.md entry.

@cwfitzgerald cwfitzgerald requested a review from a team as a code owner July 11, 2025 05:13
@cwfitzgerald cwfitzgerald force-pushed the cw/misc-docs-hal-improvements branch from 3c52fc0 to 5f9032f Compare July 11, 2025 05:19
@ErichDonGubler ErichDonGubler self-assigned this Jul 11, 2025
Copy link
Member

@ErichDonGubler ErichDonGubler left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Putting this on a low burn for my personal pipeline, and will likely take several days on it. Here are the comments I have so far. I got up to (but not including) Add annotations for the types hal types return.

@cwfitzgerald cwfitzgerald force-pushed the cw/misc-docs-hal-improvements branch from 5f9032f to ab259fd Compare July 12, 2025 06:03
@ErichDonGubler
Copy link
Member

I'm going to abandon a full review here, and approve. @kpreid has spent a lot of good time giving feedback, and this sort of change is very prone to conflicts. I've also failed to follow up with this, and I've not had any immediate substantive feedback with the PR, just questions about styling or how to best implement specific things.

I think it's best to merge, and iterate on any items I'd like to see fixed up. 🙂

@ErichDonGubler ErichDonGubler merged commit 49b773f into gfx-rs:trunk Jul 16, 2025
40 checks passed
@cwfitzgerald cwfitzgerald deleted the cw/misc-docs-hal-improvements branch July 16, 2025 19:19
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.

3 participants