Skip to main content

Module features

Module features 

Source
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::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 by cbindgen in mozilla-central (where Firefox is developed).

Structs§

FeatureBits
Bits from Features in array form
Features
Features that are not guaranteed to be supported.
FeaturesWGPU
Features that are not guaranteed to be supported.
FeaturesWebGPU
Features that are not guaranteed to be supported.