Cargo Features

[dependencies]
wgpu-types = { version = "25.0.0", default-features = false, features = ["std", "fragile-send-sync-non-atomic-wasm", "serde", "counters", "trace"] }
default = std

The std feature is set by default whenever wgpu-types is added without default-features = false somewhere in the dependency tree.

std default trace?

Enables std of js-sys, thiserror, and web-sys

thiserror:

Std feature enables support for formatting std::path::{Path, PathBuf}
conveniently in an error message.

#[derive(Error, Debug)]
#[error("failed to create configuration file {path}")]
pub struct MyError {
pub path: PathBuf,
pub source: std::io::Error,
}

Without std, this would need to be written #[error("... {}", path.display())].

strict_asserts fragile-send-sync-non-atomic-wasm
serde

Enables bitflags and serde

counters

Enables some internal instrumentation for debugging purposes.

trace = std

Enables variants of Trace other than Trace::Off

Features from optional dependencies

In crates that don't use the dep: syntax, optional dependencies automatically become Cargo features. These features may have been created by mistake, and this functionality may be removed in the future.

thiserror std