Expand description
Β§Features
Types identifying optional features of WebGPU and wgpu. Availability varies by hardware and can be checked when requesting an adapter and device.
The wgpu Rust API always uses the Features bit flag type to represent a
set of features. However, the WebGPU-defined JavaScript API uses
kebab-case feature name strings, so some utilities are provided for
working with those names. See Features::as_str and [<Features as FromStr>::from_str].
The [bitflags] crate names flags by stringifying the
SCREAMING_SNAKE_CASE identifier. These names are returned by
Features::iter_names and parsed by Features::from_name.
[bitflags] does not currently support customized flag naming.
See https://github.com/bitflags/bitflags/issues/470.
Re-exportsΒ§
pub use webgpu_impl::*;
ModulesΒ§
- webgpu_
impl π - Constant values for
super::FeaturesWebGPU, separated so they can be picked up bycbindgeninmozilla-central(where Firefox is developed).
MacrosΒ§
- bit_
array_ πimpl - bitflags_
array π - Macro for creating sets of bitflags, we need this because there are almost more flags than bits in a u64, we canβt use a u128 because of FFI, and the number of flags is increasing.
- bitflags_
array_ πimpl - bitflags_
array_ πimpl_ assign - bitflags_
independent_ πtwo_ arg
StructsΒ§
- Feature
Bits - Bits from
Featuresin array form - Features
- Features that are not guaranteed to be supported.
- FeaturesWGPU
- Features that are not guaranteed to be supported.
- Features
WebGPU - Features that are not guaranteed to be supported.