[package]
name = "wgpu"
version.workspace = true
authors.workspace = true
edition.workspace = true
description = "Rusty WebGPU API wrapper"
homepage.workspace = true
repository.workspace = true
keywords.workspace = true
license.workspace = true
readme = "../README.md"
exclude = ["Cargo.lock"]
[package.metadata.docs.rs]
all-features = true
rustdoc-args = ["--cfg", "docsrs"]
targets = [
"x86_64-unknown-linux-gnu",
"x86_64-apple-darwin",
"x86_64-pc-windows-msvc",
"wasm32-unknown-unknown",
]
[package.metadata.cargo-machete]
ignored = ["cfg_aliases"]
[lib]
[features]
default = ["wgsl", "dx12", "metal", "webgpu"]
dx12 = ["wgc?/dx12"]
metal = ["wgc?/metal"]
webgpu = ["naga?/wgsl-out"]
angle = ["wgc?/gles"]
vulkan-portability = ["wgc?/vulkan"]
webgl = ["dep:hal", "wgc/gles"]
spirv = ["naga/spv-in", "wgc/spirv"]
glsl = ["naga/glsl-in", "wgc/glsl"]
wgsl = ["wgc?/wgsl"]
naga-ir = ["dep:naga"]
strict_asserts = ["wgc?/strict_asserts", "wgt/strict_asserts"]
serde = ["dep:serde", "wgc/serde"]
replay = ["serde", "wgc/replay"]
counters = ["wgc/counters"]
fragile-send-sync-non-atomic-wasm = [
"hal/fragile-send-sync-non-atomic-wasm",
"wgc/fragile-send-sync-non-atomic-wasm",
"wgt/fragile-send-sync-non-atomic-wasm",
]
[dependencies.wgc]
optional = true
workspace = true
features = ["raw-window-handle"]
[target.'cfg(any(not(target_arch = "wasm32"), target_os = "emscripten"))'.dependencies.wgc]
workspace = true
features = ["raw-window-handle"]
[target.'cfg(not(target_arch = "wasm32"))'.dependencies.wgc]
workspace = true
features = ["indirect-validation"]
[target.'cfg(any(target_os = "macos", target_os = "ios"))'.dependencies.wgc]
workspace = true
[target.'cfg(windows)'.dependencies.wgc]
workspace = true
features = ["gles"]
[target.'cfg(any(windows, all(unix, not(target_os = "emscripten"), not(target_os = "ios"), not(target_os = "macos"))))'.dependencies.wgc]
workspace = true
features = ["vulkan"]
[target.'cfg(all(unix, not(target_os = "ios"), not(target_os = "macos")))'.dependencies.wgc]
workspace = true
features = ["gles"]
[dependencies.wgt]
workspace = true
[target.'cfg(any(not(target_arch = "wasm32"), target_os = "emscripten"))'.dependencies]
hal = { workspace = true }
[target.'cfg(all(not(target_arch = "wasm32"), unix, not(target_os = "ios"), not(target_os = "macos")))'.dependencies]
hal = { workspace = true, features = ["renderdoc"] }
[target.'cfg(windows)'.dependencies]
hal = { workspace = true, features = ["renderdoc"] }
[target.'cfg(target_arch = "wasm32")'.dependencies.hal]
workspace = true
optional = true
[dependencies]
arrayvec.workspace = true
document-features.workspace = true
log.workspace = true
parking_lot.workspace = true
profiling.workspace = true
raw-window-handle = { workspace = true, features = ["std"] }
serde = { workspace = true, features = ["derive"], optional = true }
smallvec.workspace = true
static_assertions.workspace = true
[dependencies.naga]
workspace = true
optional = true
[build-dependencies]
cfg_aliases.workspace = true
[dev-dependencies.naga]
workspace = true
features = ["wgsl-in"]
[target.'cfg(target_arch = "wasm32")'.dependencies]
web-sys = { workspace = true, features = [
"Document",
"Navigator",
"Node",
"NodeList",
"HtmlCanvasElement",
"OffscreenCanvas",
"ImageBitmap",
"ImageBitmapRenderingContext",
"Window",
"WorkerGlobalScope",
"WorkerNavigator",
"Event",
"EventTarget",
] }
wasm-bindgen.workspace = true
js-sys.workspace = true
wasm-bindgen-futures.workspace = true
parking_lot.workspace = true