Cargo Features

[dependencies]
li-wgpu-hal = { version = "0.18.1", default-features = false, features = ["metal", "vulkan", "gles", "dx11", "dx12", "windows_rs", "dxc_shader_compiler", "renderdoc", "fragile-send-sync-non-atomic-wasm", "link"] }
default = link

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

metal link = block

Enables msl-out of naga ^0.14.0

naga:

Enables outputting to the Metal Shading Language (MSL).

This enables MSL output regardless of the target platform. If you want to enable it only when targeting iOS/tvOS/watchOS/macOS, use naga/msl-out-if-target-apple.

Affects li-wgpu-hal::metal

vulkan = ash, gpu-alloc, gpu-descriptor, libloading, smallvec

Enables spv-out of naga ^0.14.0

Affects li-wgpu-hal::vulkan

gles = glow, glutin_wgl_sys, khronos-egl, libloading

Enables glsl-out of naga ^0.14.0

Affects li-wgpu-hal::gles

dx11 = d3d12, libloading

Enables hlsl-out of naga ^0.14.0, d3d11, d3d11_1, d3d11_2, d3d11sdklayers, dxgi1_6 and std of winapi

Affects li-wgpu-hal::dx11

dx12 = bit-set, d3d12, libloading, range-alloc

Enables d3d12, d3d12sdklayers, d3d12shader, dxgi1_6, std and winbase of winapi and hlsl-out of naga ^0.14.0

naga:

Enables outputting to HLSL (Microsoft's High-Level Shader Language).

This enables HLSL output regardless of the target platform. If you want to enable it only when targeting Windows, use hlsl-out-if-target-windows.

Affects li-wgpu-hal::dx12

windows_rs = gpu-allocator

TODO: This is a separate feature until Mozilla okays windows-rs, see https://github.com/gfx-rs/wgpu/issues/3207 for the tracking issue.

dxc_shader_compiler = hassle-rs
renderdoc = libloading, renderdoc-sys
fragile-send-sync-non-atomic-wasm

Enables fragile-send-sync-non-atomic-wasm of wgpu-types ^0.18.0

Enables link of metal ^0.27.0

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.

glow gles?

Enables glow ^0.13

backend: Gles

ash not wasm32 vulkan?

Enables ash ^0.37.3

bit-set win dx12?

Enables bit-set ^0.5

block mac ios metal?
glutin_wgl_sys win gles?

Enables glutin_wgl_sys ^0.5

gpu-alloc not wasm32 vulkan?
gpu-allocator win windows_rs?

Enables gpu-allocator ^0.23

gpu-descriptor not wasm32 vulkan?

Enables gpu-descriptor ^0.2

hassle-rs win dxc_shader_compiler?

Enables hassle-rs ^0.10

khronos-egl not wasm32 emscripten gles?
range-alloc win dx12?
renderdoc-sys not wasm32 renderdoc?
smallvec not wasm32 vulkan?
d3d12 win dx11? dx12?

Enables d3d12 ^0.7

libloading not wasm32 emscripten dx11? dx12? gles? renderdoc? vulkan?