Cargo Features
wgpu-hal has no features set by default.
[dependencies]
wgpu-hal = { version = "24.0.0", features = ["metal", "vulkan", "gles", "dx12", "static-dxc", "renderdoc", "fragile-send-sync-non-atomic-wasm", "oom_panic", "device_lost_panic", "internal_error_panic"] }
- metal
-
Enables the Metal backend when targeting Apple platforms.
Has no effect on non-Apple platforms.Enables block, msl-out-if-target-apple of naga
- vulkan
-
Enables ordered-float and smallvec, android_system_properties, ash, gpu-alloc, gpu-descriptor, and libloading, spv-out of naga
- gles
-
Enables ndk-sys ^0.5.0, glsl-out of naga, Win32_Graphics_Gdi, Win32_Graphics_OpenGL, Win32_System_LibraryLoader and Win32_UI_WindowsAndMessaging of windows ^0.58 and bytemuck, glow, glutin_wgl_sys, khronos-egl, and libloading
bytemuck:
backend: Gles
- dx12
-
Enables the DX12 backend when targeting Windows.
Has no effect if not targeting Windows.Enables bit-set, libloading, range-alloc, windows-core ^0.58, d3d12 of gpu-allocator, hlsl-out-if-target-windows of naga, Win32_Graphics_Direct3D, Win32_Graphics_Direct3D12, Win32_Graphics_Direct3D_Dxc, Win32_Graphics_Direct3D_Fxc, Win32_Graphics_DirectComposition, Win32_Graphics_Dxgi_Common, Win32_Security, Win32_System_Diagnostics_Debug, Win32_System_Kernel, Win32_System_Performance, Win32_System_Threading and Win32_UI_WindowsAndMessaging of windows ^0.58
- static-dxc
-
Enables statically linking DXC.
Enables mach-dxcompiler-rs
- renderdoc
-
Enables libloading and renderdoc-sys
- fragile-send-sync-non-atomic-wasm
-
Enables fragile-send-sync-non-atomic-wasm of wgpu-types
- oom_panic
-
Panic when running into an out-of-memory error (for debugging purposes).
Only affects the d3d12 and vulkan backends. - device_lost_panic
-
Panic when running into a device lost error (for debugging purposes).
Only affects the d3d12 and vulkan backends. - internal_error_panic
-
Panic when running into an internal error other than out-of-memory and device lost (for debugging purposes).
Only affects the d3d12 and vulkan backends.
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.
- gpu-allocator win dx12?
- windows win dx12? gles?
-
Enables windows ^0.58