mirror of
https://github.com/gfx-rs/wgpu.git
synced 2024-11-22 06:44:14 +00:00
f4b8b15df3
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Connor Fitzgerald <connorwadefitzgerald@gmail.com>
202 lines
5.4 KiB
TOML
202 lines
5.4 KiB
TOML
[package]
|
|
name = "wgpu-hal"
|
|
version = "0.20.0"
|
|
authors = ["gfx-rs developers"]
|
|
edition = "2021"
|
|
description = "WebGPU hardware abstraction layer"
|
|
homepage = "https://wgpu.rs/"
|
|
repository = "https://github.com/gfx-rs/wgpu"
|
|
keywords = ["graphics"]
|
|
license = "MIT OR Apache-2.0"
|
|
|
|
# Override the workspace's `rust-version` key. Firefox uses `cargo vendor` to
|
|
# copy the crates it actually uses out of the workspace, so it's meaningful for
|
|
# them to have less restrictive MSRVs individually than the workspace as a
|
|
# whole, if their code permits. See `../README.md` for details.
|
|
rust-version = "1.74"
|
|
|
|
[package.metadata.docs.rs]
|
|
# Ideally we would enable all the features.
|
|
#
|
|
# However, the metal features fail to be documented because the docs.rs runner cross-compiling under
|
|
# x86_64-unknown-linux-gnu and metal-rs cannot compile in that environment at the moment. The same applies
|
|
# for the dx12 feature.
|
|
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]
|
|
|
|
[features]
|
|
default = ["link"]
|
|
metal = ["naga/msl-out", "block"]
|
|
vulkan = [
|
|
"naga/spv-out",
|
|
"ash",
|
|
"gpu-alloc",
|
|
"gpu-descriptor",
|
|
"libloading",
|
|
"smallvec",
|
|
"android_system_properties",
|
|
]
|
|
gles = [
|
|
"naga/glsl-out",
|
|
"glow",
|
|
"glutin_wgl_sys",
|
|
"khronos-egl",
|
|
"libloading",
|
|
"ndk-sys",
|
|
]
|
|
dx12 = [
|
|
"naga/hlsl-out",
|
|
"d3d12",
|
|
"bit-set",
|
|
"libloading",
|
|
"range-alloc",
|
|
"winapi/std",
|
|
"winapi/winbase",
|
|
"winapi/d3d12",
|
|
"winapi/d3d12shader",
|
|
"winapi/d3d12sdklayers",
|
|
"winapi/dxgi1_6",
|
|
]
|
|
# TODO: This is a separate feature until Mozilla okays windows-rs, see https://github.com/gfx-rs/wgpu/issues/3207 for the tracking issue.
|
|
windows_rs = ["gpu-allocator"]
|
|
dxc_shader_compiler = ["hassle-rs"]
|
|
renderdoc = ["libloading", "renderdoc-sys"]
|
|
fragile-send-sync-non-atomic-wasm = ["wgt/fragile-send-sync-non-atomic-wasm"]
|
|
link = ["metal/link"]
|
|
# Panic when running into an out-of-memory error (for debugging purposes).
|
|
#
|
|
# Only affects the d3d12 and vulkan backends.
|
|
oom_panic = []
|
|
# Panic when running into a device lost error (for debugging purposes).
|
|
# Only affects the d3d12 and vulkan backends.
|
|
device_lost_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.
|
|
internal_error_panic = []
|
|
|
|
[[example]]
|
|
name = "halmark"
|
|
|
|
[[example]]
|
|
name = "raw-gles"
|
|
required-features = ["gles"]
|
|
|
|
[dependencies]
|
|
bitflags = "2"
|
|
parking_lot = ">=0.11,<0.13"
|
|
profiling = { version = "1", default-features = false }
|
|
raw-window-handle = "0.6"
|
|
thiserror = "1"
|
|
once_cell = "1.19.0"
|
|
|
|
# backends common
|
|
arrayvec = "0.7"
|
|
rustc-hash = "1.1"
|
|
log = "0.4"
|
|
|
|
# backend: Gles
|
|
glow = { version = "0.13.1", optional = true }
|
|
|
|
[dependencies.wgt]
|
|
package = "wgpu-types"
|
|
path = "../wgpu-types"
|
|
version = "0.20.0"
|
|
|
|
[target.'cfg(not(target_arch = "wasm32"))'.dependencies]
|
|
# backend: Vulkan
|
|
ash = { version = "0.37.3", optional = true }
|
|
gpu-alloc = { version = "0.6", optional = true }
|
|
gpu-descriptor = { version = "0.3", optional = true }
|
|
smallvec = { version = "1", optional = true, features = ["union"] }
|
|
|
|
khronos-egl = { version = "6", features = ["dynamic"], optional = true }
|
|
libloading = { version = ">=0.7, <0.9", optional = true }
|
|
renderdoc-sys = { version = "1.1.0", optional = true }
|
|
|
|
[target.'cfg(target_os = "emscripten")'.dependencies]
|
|
khronos-egl = { version = "6", features = ["static", "no-pkg-config"] }
|
|
#Note: it's unused by emscripten, but we keep it to have single code base in egl.rs
|
|
libloading = { version = ">=0.7, <0.9", optional = true }
|
|
|
|
[target.'cfg(windows)'.dependencies]
|
|
# backend: Dx12
|
|
bit-set = { version = "0.5", optional = true }
|
|
range-alloc = { version = "0.1", optional = true }
|
|
gpu-allocator = { version = "0.26", default_features = false, features = [
|
|
"d3d12",
|
|
"public-winapi",
|
|
], optional = true }
|
|
hassle-rs = { version = "0.11", optional = true }
|
|
# backend: Gles
|
|
glutin_wgl_sys = { version = "0.5", optional = true }
|
|
|
|
winapi = { version = "0.3", features = [
|
|
"profileapi",
|
|
"libloaderapi",
|
|
"windef",
|
|
"winuser",
|
|
"dcomp",
|
|
] }
|
|
d3d12 = { path = "../d3d12/", version = "0.20.0", optional = true, features = [
|
|
"libloading",
|
|
] }
|
|
|
|
[target.'cfg(any(target_os="macos", target_os="ios"))'.dependencies]
|
|
# backend: Metal
|
|
block = { version = "0.1", optional = true }
|
|
|
|
metal = { version = "0.28.0" }
|
|
objc = "0.2.5"
|
|
core-graphics-types = "0.1"
|
|
|
|
[target.'cfg(all(target_arch = "wasm32", not(target_os = "emscripten")))'.dependencies]
|
|
wasm-bindgen = "0.2.87"
|
|
web-sys = { version = "0.3.69", features = [
|
|
"Window",
|
|
"HtmlCanvasElement",
|
|
"WebGl2RenderingContext",
|
|
"OffscreenCanvas",
|
|
] }
|
|
js-sys = "0.3.69"
|
|
|
|
[target.'cfg(unix)'.dependencies]
|
|
libc = "0.2"
|
|
|
|
[target.'cfg(target_os = "android")'.dependencies]
|
|
android_system_properties = { version = "0.1.1", optional = true }
|
|
ndk-sys = { version = "0.5.0", optional = true }
|
|
|
|
[dependencies.naga]
|
|
path = "../naga"
|
|
version = "0.20.0"
|
|
|
|
[build-dependencies]
|
|
cfg_aliases.workspace = true
|
|
|
|
# DEV dependencies
|
|
[dev-dependencies.naga]
|
|
path = "../naga"
|
|
version = "0.20.0"
|
|
features = ["wgsl-in"]
|
|
|
|
[dev-dependencies]
|
|
cfg-if = "1"
|
|
env_logger = "0.11"
|
|
glam = "0.27.0" # for ray-traced-triangle example
|
|
winit = { version = "0.29", features = [
|
|
"android-native-activity",
|
|
] } # for "halmark" example
|
|
|
|
[target.'cfg(not(target_arch = "wasm32"))'.dev-dependencies]
|
|
glutin = "0.29.1" # for "gles" example
|