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

Document when types are not WebGPU types. #3235

Merged
merged 2 commits into from
Dec 1, 2022

Conversation

kpreid
Copy link
Contributor

@kpreid kpreid commented Nov 25, 2022

Checklist

  • Run cargo clippy.
  • Run RUSTFLAGS=--cfg=web_sys_unstable_apis cargo clippy --target wasm32-unknown-unknown if applicable.
  • Add change to CHANGELOG.md. See simple instructions inside file. Skipping this

Connections
This is a probably-less-interesting side branch from #2653 where I added documentation linking to the WebGPU specification to many types.

Description
This change documents types that don't correspond to the WebGPU specification, so readers can know they are unique to wgpu.

I also changed the wording in BufferSlice to be more consistent with other documentation.

Testing
Only documentation was changed. I manually examined the rustdoc output.

@codecov-commenter
Copy link

codecov-commenter commented Nov 25, 2022

Codecov Report

Merging #3235 (9b1c41a) into master (d4b1d57) will decrease coverage by 0.00%.
The diff coverage is n/a.

@@            Coverage Diff             @@
##           master    #3235      +/-   ##
==========================================
- Coverage   64.64%   64.63%   -0.01%     
==========================================
  Files          82       82              
  Lines       39501    39501              
==========================================
- Hits        25534    25532       -2     
- Misses      13967    13969       +2     
Impacted Files Coverage Δ
wgpu/src/lib.rs 50.33% <ø> (ø)
wgpu/src/util/mod.rs 12.50% <ø> (ø)
wgpu-hal/src/dx12/descriptor.rs 87.62% <0.00%> (-0.50%) ⬇️
wgpu-core/src/hub.rs 60.67% <0.00%> (-0.16%) ⬇️

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

@cwfitzgerald
Copy link
Member

The only thing I worry about is that people might interpret this as them being native features, not just that they're unique to wgpu.

@kpreid
Copy link
Contributor Author

kpreid commented Nov 26, 2022

Hmm. For that concern, what do you think of something like

This type is unique to the Rust API of wgpu. In the WebGPU specification, {explain the corresponding thing} instead.

The idea being to emphasize that this is a “Rust bindings” thing.

@cwfitzgerald
Copy link
Member

That looks great

Copy link
Member

@cwfitzgerald cwfitzgerald left a comment

Choose a reason for hiding this comment

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

For above change.

I also changed the wording in BufferSlice to be more consistent with
other documentation.
@kpreid
Copy link
Contributor Author

kpreid commented Dec 1, 2022

Done. For example, Operations' documentation now contains

This type is unique to the Rust API of wgpu. In the WebGPU specification, separate loadOp and storeOp fields are used instead.

@kpreid kpreid requested a review from cwfitzgerald December 1, 2022 02:27
@cwfitzgerald cwfitzgerald enabled auto-merge (squash) December 1, 2022 02:29
@cwfitzgerald cwfitzgerald merged commit 98999da into gfx-rs:master Dec 1, 2022
@kpreid kpreid deleted the typedocs branch December 12, 2022 03:36
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