Re-export wgpu_types
- Dominant language
- Rust
- Stars
- 48.2k
- Forks
- 4.8k
- Avg merge
- 3d 22h
- Merged PRs (30d)
- 161
Description
## What problem does this solve or what need does it fill?
Certain Bevy APIs (such as [RenderDevice::poll](https://docs.rs/bevy/latest/bevy/render/renderer/struct.RenderDevice.html#method.poll) and other low-level graphics APIs) use types from `wgpu_types` which are not re-exported by Bevy. Using these methods requires linking the same version of `wgpu_types` as Bevy, which I feel is an unnecessary annoyance for a modular game engine like Bevy.
## What solution would you like?
All types which appear as arguments or public fields in any public Bevy API should be publicly re-exported - aka, I should be able to call any Bevy method or construct any public type without ever needing to include a specific version of another library.
To accomplish this, we should audit the types used in public APIs and re-export those in an organized way, such as in a new `render_resource::raw` or `render_resource::wgpu` module.
## What alternative(s) have you considered?
Re-export `wgpu_types` wholesale. It's easier, but obviates a perhaps more thoughtful organization of only those `wgpu_types` types which are actually necessary for Bevy.
## Additional context
Types like these also provide bad user experience in docs.rs, being types which you can't click to visit docs for. Perhaps there's also a way to use rustdoc to easily list the problem APIs?
Contributor guide
Assessment
This issue has not been assessed yet.