Cargo Features
[dependencies]
wgpu-core = { version = "0.20.0", default-features = false, features = ["api_log_info", "resource_log_info", "link", "renderdoc", "strict_asserts", "serde", "trace", "replay", "wgsl", "glsl", "spirv", "fragile-send-sync-non-atomic-wasm", "metal", "vulkan", "gles", "dx12", "raw-window-handle"] }
- default = link
-
The
link
feature is set by default wheneverwgpu-core
is added without
somewhere in the dependency tree.default-features = false - api_log_info
-
Log all API entry points at info instead of trace level.
- resource_log_info
-
Log resource lifecycle management at info instead of trace level.
- link default
-
Use static linking for libraries. Disable to manually link. Enabled by default.
- renderdoc
-
Support the Renderdoc graphics debugger: https://renderdoc.org/
- strict_asserts
-
Apply run-time checks, even in release builds. These are in addition to the validation carried out at public APIs in all builds.
Enables strict_asserts of wgpu-types
- serde replay? trace?
-
Enables serialization via
serde
on common wgpu types.Enables serde, serde of arrayvec, serde of wgpu-types
- trace = ron, serde
-
Enable API tracing.
Affects
trace::Trace
,device::trace
… - replay = serde
-
Enable API replaying
Enables deserialize of naga
Affects
device::trace
… - wgsl
-
Enable
ShaderModuleSource::Wgsl
- glsl
-
Enable
ShaderModuleSource::Glsl
- spirv
-
Enable
ShaderModuleSource::SpirV
- fragile-send-sync-non-atomic-wasm
-
Implement
Send
andSync
on Wasm, but only if atomics are not enabled.WebGL/WebGPU objects can not be shared between threads. However, it can be useful to artificially mark them as
Send
andSync
anyways to make it easier to write cross-platform code. This is technically very unsafe in a multithreaded environment, but on a wasm binary compiled without atomics we know we are definitely not in a multithreaded environment.Enables fragile-send-sync-non-atomic-wasm of wgpu-hal and wgpu-types
- metal
-
Backends, passed through to wgpu-hal
Enable the
metal
backend. - vulkan
-
Enable the
vulkan
backend. - gles
-
Enable the
GLES
backend.This is used for all of GLES, OpenGL, and WebGL.
- dx12
-
Enable the
dx12
backend.
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.
- raw-window-handle implicit feature
-
Enables raw-window-handle
raw-window-handle:
Interoperability library for Rust Windowing applications
- ron trace?