2021-06-04 05:19:36 +00:00
|
|
|
[package]
|
|
|
|
name = "wgpu-hal"
|
2023-10-25 17:53:22 +00:00
|
|
|
version = "0.18.0"
|
2023-10-27 04:15:51 +00:00
|
|
|
authors = ["gfx-rs developers"]
|
2022-12-15 20:46:28 +00:00
|
|
|
edition = "2021"
|
2021-06-04 05:19:36 +00:00
|
|
|
description = "WebGPU hardware abstraction layer"
|
2022-12-15 20:46:28 +00:00
|
|
|
homepage = "https://wgpu.rs/"
|
|
|
|
repository = "https://github.com/gfx-rs/wgpu"
|
|
|
|
keywords = ["graphics"]
|
|
|
|
license = "MIT OR Apache-2.0"
|
2022-11-23 21:22:03 +00:00
|
|
|
|
|
|
|
# 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.
|
2023-10-04 01:03:32 +00:00
|
|
|
rust-version = "1.65"
|
2021-06-04 05:19:36 +00:00
|
|
|
|
2022-10-26 21:07:25 +00:00
|
|
|
[package.metadata.docs.rs]
|
|
|
|
# Ideally we would enable all the features.
|
|
|
|
#
|
|
|
|
# However the metal features fails 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
|
|
|
|
# with the dx11 and dx12 features.
|
|
|
|
features = ["vulkan", "gles", "renderdoc"]
|
|
|
|
rustdoc-args = ["--cfg", "docsrs"]
|
2023-02-09 20:38:40 +00:00
|
|
|
targets = [
|
|
|
|
"x86_64-unknown-linux-gnu",
|
|
|
|
"x86_64-apple-darwin",
|
|
|
|
"x86_64-pc-windows-msvc",
|
|
|
|
"wasm32-unknown-unknown",
|
|
|
|
]
|
2022-10-26 21:07:25 +00:00
|
|
|
|
2021-06-04 05:19:36 +00:00
|
|
|
[lib]
|
|
|
|
|
|
|
|
[features]
|
2023-06-28 10:30:28 +00:00
|
|
|
default = ["link"]
|
2023-06-06 19:45:06 +00:00
|
|
|
metal = ["naga/msl-out", "block"]
|
2023-10-25 17:53:22 +00:00
|
|
|
vulkan = [
|
|
|
|
"naga/spv-out",
|
|
|
|
"ash",
|
|
|
|
"gpu-alloc",
|
|
|
|
"gpu-descriptor",
|
|
|
|
"libloading",
|
|
|
|
"smallvec",
|
|
|
|
]
|
2023-10-18 18:40:33 +00:00
|
|
|
gles = ["naga/glsl-out", "glow", "glutin_wgl_sys", "khronos-egl", "libloading"]
|
2023-10-25 17:53:22 +00:00
|
|
|
dx11 = [
|
|
|
|
"naga/hlsl-out",
|
|
|
|
"d3d12",
|
|
|
|
"libloading",
|
|
|
|
"winapi/d3d11",
|
|
|
|
"winapi/std",
|
|
|
|
"winapi/d3d11_1",
|
|
|
|
"winapi/d3d11_2",
|
|
|
|
"winapi/d3d11sdklayers",
|
|
|
|
"winapi/dxgi1_6",
|
|
|
|
]
|
|
|
|
dx12 = [
|
|
|
|
"naga/hlsl-out",
|
|
|
|
"d3d12",
|
|
|
|
"bit-set",
|
|
|
|
"libloading",
|
|
|
|
"range-alloc",
|
|
|
|
"winapi/std",
|
|
|
|
"winapi/winbase",
|
|
|
|
"winapi/d3d12",
|
|
|
|
"winapi/d3d12shader",
|
|
|
|
"winapi/d3d12sdklayers",
|
|
|
|
"winapi/dxgi1_6",
|
|
|
|
]
|
2022-12-20 17:23:44 +00:00
|
|
|
# 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"]
|
2023-01-18 21:25:56 +00:00
|
|
|
dxc_shader_compiler = ["hassle-rs"]
|
2021-07-14 16:40:01 +00:00
|
|
|
renderdoc = ["libloading", "renderdoc-sys"]
|
2023-06-29 20:31:18 +00:00
|
|
|
fragile-send-sync-non-atomic-wasm = ["wgt/fragile-send-sync-non-atomic-wasm"]
|
2023-06-28 10:30:28 +00:00
|
|
|
link = ["metal/link"]
|
2021-06-04 05:19:36 +00:00
|
|
|
|
2022-01-03 05:54:43 +00:00
|
|
|
[[example]]
|
|
|
|
name = "halmark"
|
|
|
|
|
|
|
|
[[example]]
|
|
|
|
name = "raw-gles"
|
|
|
|
required-features = ["gles"]
|
|
|
|
|
2021-06-04 05:19:36 +00:00
|
|
|
[dependencies]
|
2023-04-05 22:24:59 +00:00
|
|
|
bitflags = "2"
|
2022-12-15 20:46:28 +00:00
|
|
|
parking_lot = ">=0.11,<0.13"
|
|
|
|
profiling = { version = "1", default-features = false }
|
2023-10-27 05:24:46 +00:00
|
|
|
raw-window-handle = "0.6"
|
2022-12-15 20:46:28 +00:00
|
|
|
thiserror = "1"
|
2023-10-18 18:40:33 +00:00
|
|
|
once_cell = "1.18.0"
|
2021-06-05 05:44:21 +00:00
|
|
|
|
2021-06-11 06:09:03 +00:00
|
|
|
# backends common
|
2022-12-15 20:46:28 +00:00
|
|
|
arrayvec = "0.7"
|
2023-03-01 18:46:38 +00:00
|
|
|
rustc-hash = "1.1"
|
2022-12-15 20:46:28 +00:00
|
|
|
log = "0.4"
|
2021-07-14 16:40:01 +00:00
|
|
|
|
2021-06-18 04:38:27 +00:00
|
|
|
# backend: Gles
|
2023-11-06 12:58:26 +00:00
|
|
|
glow = { version = "0.13", git = "https://github.com/grovesNL/glow.git", rev = "29ff917a2b2ff7ce0a81b2cc5681de6d4735b36e", optional = true }
|
2021-07-14 16:40:01 +00:00
|
|
|
|
2021-08-18 19:06:21 +00:00
|
|
|
[dependencies.wgt]
|
2022-12-15 20:46:28 +00:00
|
|
|
package = "wgpu-types"
|
|
|
|
path = "../wgpu-types"
|
2023-10-25 17:53:22 +00:00
|
|
|
version = "0.18.0"
|
2021-08-18 19:06:21 +00:00
|
|
|
|
2021-06-18 04:38:27 +00:00
|
|
|
[target.'cfg(not(target_arch = "wasm32"))'.dependencies]
|
2023-02-21 12:50:55 +00:00
|
|
|
# backend: Vulkan
|
2023-06-07 09:11:39 +00:00
|
|
|
ash = { version = "0.37.3", optional = true }
|
2023-06-12 09:40:54 +00:00
|
|
|
gpu-alloc = { version = "0.6", optional = true }
|
2023-02-21 12:50:55 +00:00
|
|
|
gpu-descriptor = { version = "0.2", optional = true }
|
|
|
|
smallvec = { version = "1", optional = true, features = ["union"] }
|
|
|
|
|
2023-10-05 18:01:32 +00:00
|
|
|
khronos-egl = { version = "6", features = ["dynamic"], optional = true }
|
2023-10-03 12:14:34 +00:00
|
|
|
libloading = { version = ">=0.7, <0.9", optional = true }
|
2023-02-21 12:50:55 +00:00
|
|
|
renderdoc-sys = { version = "1.0.0", optional = true }
|
2021-06-08 15:46:53 +00:00
|
|
|
|
2022-01-25 10:35:45 +00:00
|
|
|
[target.'cfg(target_os = "emscripten")'.dependencies]
|
2023-10-05 18:01:32 +00:00
|
|
|
khronos-egl = { version = "6", features = ["static", "no-pkg-config"] }
|
2022-01-25 10:35:45 +00:00
|
|
|
#Note: it's unused by emscripten, but we keep it to have single code base in egl.rs
|
2023-10-03 12:14:34 +00:00
|
|
|
libloading = { version = ">=0.7, <0.9", optional = true }
|
2022-01-25 10:35:45 +00:00
|
|
|
|
2021-06-16 15:42:37 +00:00
|
|
|
[target.'cfg(windows)'.dependencies]
|
2023-02-21 12:50:55 +00:00
|
|
|
# backend: Dx12
|
|
|
|
bit-set = { version = "0.5", optional = true }
|
|
|
|
range-alloc = { version = "0.1", optional = true }
|
2023-11-03 08:24:36 +00:00
|
|
|
gpu-allocator = { version = "0.24", default_features = false, features = [
|
2023-10-25 17:53:22 +00:00
|
|
|
"d3d12",
|
|
|
|
"public-winapi",
|
|
|
|
], optional = true }
|
2023-11-02 03:41:17 +00:00
|
|
|
hassle-rs = { version = "0.11", optional = true }
|
2023-10-18 18:40:33 +00:00
|
|
|
# backend: Gles
|
2023-10-23 03:01:46 +00:00
|
|
|
glutin_wgl_sys = { version = "0.5", optional = true }
|
2023-02-21 12:50:55 +00:00
|
|
|
|
2023-10-25 17:53:22 +00:00
|
|
|
winapi = { version = "0.3", features = [
|
|
|
|
"profileapi",
|
|
|
|
"libloaderapi",
|
|
|
|
"windef",
|
|
|
|
"winuser",
|
|
|
|
"dcomp",
|
|
|
|
] }
|
2023-10-27 04:15:51 +00:00
|
|
|
d3d12 = { path = "../d3d12/", version = "0.7.0", optional = true, features = [
|
|
|
|
"libloading",
|
|
|
|
] }
|
2021-06-16 15:42:37 +00:00
|
|
|
|
|
|
|
[target.'cfg(any(target_os="macos", target_os="ios"))'.dependencies]
|
2023-02-21 12:50:55 +00:00
|
|
|
# backend: Metal
|
|
|
|
block = { version = "0.1", optional = true }
|
|
|
|
|
2023-10-25 18:04:01 +00:00
|
|
|
metal = "0.27.0"
|
2022-12-15 20:46:28 +00:00
|
|
|
objc = "0.2.5"
|
|
|
|
core-graphics-types = "0.1"
|
2021-06-16 15:42:37 +00:00
|
|
|
|
2022-01-25 10:35:45 +00:00
|
|
|
[target.'cfg(all(target_arch = "wasm32", not(target_os = "emscripten")))'.dependencies]
|
2023-07-19 20:30:14 +00:00
|
|
|
wasm-bindgen = "0.2.87"
|
2023-11-26 22:54:29 +00:00
|
|
|
web-sys = { version = "0.3.65", features = [
|
2023-10-25 17:53:22 +00:00
|
|
|
"Window",
|
|
|
|
"HtmlCanvasElement",
|
|
|
|
"WebGl2RenderingContext",
|
|
|
|
"OffscreenCanvas",
|
|
|
|
] }
|
2023-11-28 02:24:42 +00:00
|
|
|
js-sys = "0.3.66"
|
2021-10-07 20:18:09 +00:00
|
|
|
|
2022-12-20 17:52:08 +00:00
|
|
|
[target.'cfg(unix)'.dependencies]
|
|
|
|
libc = "0.2"
|
|
|
|
|
2022-06-04 16:05:40 +00:00
|
|
|
[target.'cfg(target_os = "android")'.dependencies]
|
2022-12-15 20:46:28 +00:00
|
|
|
android_system_properties = "0.1.1"
|
2022-06-04 16:05:40 +00:00
|
|
|
|
2021-06-05 05:44:21 +00:00
|
|
|
[dependencies.naga]
|
2023-10-25 20:51:36 +00:00
|
|
|
path = "../naga"
|
2023-10-25 17:53:22 +00:00
|
|
|
version = "0.14.0"
|
2022-09-19 04:50:46 +00:00
|
|
|
features = ["clone"]
|
2021-06-08 18:58:48 +00:00
|
|
|
|
2022-01-06 17:02:44 +00:00
|
|
|
# DEV dependencies
|
2021-06-08 18:58:48 +00:00
|
|
|
[dev-dependencies.naga]
|
2023-10-25 20:51:36 +00:00
|
|
|
path = "../naga"
|
2023-10-25 17:53:22 +00:00
|
|
|
version = "0.14.0"
|
2021-06-08 18:58:48 +00:00
|
|
|
features = ["wgsl-in"]
|
|
|
|
|
|
|
|
[dev-dependencies]
|
2023-06-10 18:35:46 +00:00
|
|
|
cfg-if = "1"
|
2023-02-10 20:12:04 +00:00
|
|
|
env_logger = "0.10"
|
2023-11-28 17:20:20 +00:00
|
|
|
winit = { version = "0.29.4", features = [
|
2023-11-06 12:58:26 +00:00
|
|
|
"android-native-activity",
|
|
|
|
] } # for "halmark" example
|
2022-01-06 17:02:44 +00:00
|
|
|
|
|
|
|
[target.'cfg(not(target_arch = "wasm32"))'.dev-dependencies]
|
2022-12-15 20:46:28 +00:00
|
|
|
glutin = "0.29.1" # for "gles" example
|