# THIS FILE IS AUTOMATICALLY GENERATED BY CARGO
#
# When uploading crates to the registry Cargo will automatically
# "normalize" Cargo.toml files for maximal compatibility
# with all versions of Cargo and also rewrite `path` dependencies
# to registry (e.g., crates.io) dependencies.
#
# If you are reading this file be aware that the original Cargo.toml
# will likely look very different (and much more reasonable).
# See Cargo.toml.orig for the original contents.

[package]
edition = "2021"
rust-version = "1.74"
name = "wgpu-hal"
version = "0.20.0"
authors = ["gfx-rs developers"]
description = "WebGPU hardware abstraction layer"
homepage = "https://wgpu.rs/"
readme = "README.md"
keywords = ["graphics"]
license = "MIT OR Apache-2.0"
repository = "https://github.com/gfx-rs/wgpu"

[package.metadata.cargo-machete]
ignored = ["cfg_aliases"]

[package.metadata.docs.rs]
features = [
    "vulkan",
    "gles",
    "renderdoc",
]
rustdoc-args = [
    "--cfg",
    "docsrs",
]
targets = [
    "x86_64-unknown-linux-gnu",
    "x86_64-apple-darwin",
    "x86_64-pc-windows-msvc",
    "wasm32-unknown-unknown",
]

[lib]

[[example]]
name = "halmark"

[[example]]
name = "raw-gles"
required-features = ["gles"]

[dependencies]
arrayvec = "0.7"
bitflags = "2"
log = "0.4"
once_cell = "1.19.0"
parking_lot = ">=0.11,<0.13"
raw-window-handle = "0.6"
rustc-hash = "1.1"
thiserror = "1"

[dependencies.glow]
version = "0.13.1"
optional = true

[dependencies.naga]
version = "0.20.0"
path = "../naga"

[dependencies.profiling]
version = "1"
default-features = false

[dependencies.wgt]
version = "0.20.0"
path = "../wgpu-types"
package = "wgpu-types"

[dev-dependencies]
cfg-if = "1"
env_logger = "0.11"
glam = "0.27.0"

[dev-dependencies.naga]
version = "0.20.0"
path = "../naga"
features = ["wgsl-in"]

[dev-dependencies.winit]
version = "0.29"
features = ["android-native-activity"]

[build-dependencies]
cfg_aliases = "0.1"

[features]
device_lost_panic = []
dx12 = [
    "naga/hlsl-out",
    "dep:d3d12",
    "dep:bit-set",
    "dep:libloading",
    "dep:range-alloc",
    "winapi/std",
    "winapi/winbase",
    "winapi/d3d12",
    "winapi/d3d12shader",
    "winapi/d3d12sdklayers",
    "winapi/dxgi1_6",
    "winapi/errhandlingapi",
]
dxc_shader_compiler = ["dep:hassle-rs"]
fragile-send-sync-non-atomic-wasm = ["wgt/fragile-send-sync-non-atomic-wasm"]
gles = [
    "naga/glsl-out",
    "dep:glow",
    "dep:glutin_wgl_sys",
    "dep:khronos-egl",
    "dep:libloading",
    "dep:ndk-sys",
    "winapi/libloaderapi",
]
internal_error_panic = []
metal = [
    "naga/msl-out",
    "dep:block",
]
oom_panic = []
renderdoc = [
    "dep:libloading",
    "dep:renderdoc-sys",
]
vulkan = [
    "naga/spv-out",
    "dep:ash",
    "dep:gpu-alloc",
    "dep:gpu-descriptor",
    "dep:libloading",
    "dep:smallvec",
    "dep:android_system_properties",
]
windows_rs = ["dep:gpu-allocator"]

[target."cfg(all(target_arch = \"wasm32\", not(target_os = \"emscripten\")))".dependencies]
js-sys = "0.3.69"
wasm-bindgen = "0.2.87"

[target."cfg(all(target_arch = \"wasm32\", not(target_os = \"emscripten\")))".dependencies.web-sys]
version = "0.3.69"
features = [
    "Window",
    "HtmlCanvasElement",
    "WebGl2RenderingContext",
    "OffscreenCanvas",
]

[target."cfg(any(target_os=\"macos\", target_os=\"ios\"))".dependencies]
core-graphics-types = "0.1"
objc = "0.2.5"

[target."cfg(any(target_os=\"macos\", target_os=\"ios\"))".dependencies.block]
version = "0.1"
optional = true

[target."cfg(any(target_os=\"macos\", target_os=\"ios\"))".dependencies.metal]
version = "0.28.0"

[target."cfg(not(target_arch = \"wasm32\"))".dependencies.ash]
version = "0.38.0"
optional = true

[target."cfg(not(target_arch = \"wasm32\"))".dependencies.gpu-alloc]
version = "0.6"
optional = true

[target."cfg(not(target_arch = \"wasm32\"))".dependencies.gpu-descriptor]
version = "0.3"
optional = true

[target."cfg(not(target_arch = \"wasm32\"))".dependencies.khronos-egl]
version = "6"
features = ["dynamic"]
optional = true

[target."cfg(not(target_arch = \"wasm32\"))".dependencies.libloading]
version = ">=0.7, <0.9"
optional = true

[target."cfg(not(target_arch = \"wasm32\"))".dependencies.renderdoc-sys]
version = "1.1.0"
optional = true

[target."cfg(not(target_arch = \"wasm32\"))".dependencies.smallvec]
version = "1"
features = ["union"]
optional = true

[target."cfg(not(target_arch = \"wasm32\"))".dev-dependencies]
glutin = "0.29.1"

[target."cfg(target_os = \"android\")".dependencies.android_system_properties]
version = "0.1.1"
optional = true

[target."cfg(target_os = \"android\")".dependencies.ndk-sys]
version = "0.5.0"
optional = true

[target."cfg(target_os = \"emscripten\")".dependencies.khronos-egl]
version = "6"
features = [
    "static",
    "no-pkg-config",
]

[target."cfg(target_os = \"emscripten\")".dependencies.libloading]
version = ">=0.7, <0.9"
optional = true

[target."cfg(unix)".dependencies]
libc = "0.2"

[target."cfg(windows)".dependencies.bit-set]
version = "0.5"
optional = true

[target."cfg(windows)".dependencies.d3d12]
version = "0.20.0"
path = "../d3d12/"
features = ["libloading"]
optional = true

[target."cfg(windows)".dependencies.glutin_wgl_sys]
version = "0.5"
optional = true

[target."cfg(windows)".dependencies.gpu-allocator]
version = "0.26"
features = [
    "d3d12",
    "public-winapi",
]
optional = true
default-features = false

[target."cfg(windows)".dependencies.hassle-rs]
version = "0.11"
optional = true

[target."cfg(windows)".dependencies.range-alloc]
version = "0.1"
optional = true

[target."cfg(windows)".dependencies.winapi]
version = "0.3"
features = [
    "profileapi",
    "windef",
    "winuser",
    "dcomp",
]
