2021-06-04 05:19:36 +00:00
|
|
|
[package]
|
|
|
|
name = "wgpu-hal"
|
2022-10-20 05:41:17 +00:00
|
|
|
version.workspace = true
|
|
|
|
authors.workspace = true
|
|
|
|
edition.workspace = true
|
2021-06-04 05:19:36 +00:00
|
|
|
description = "WebGPU hardware abstraction layer"
|
2022-10-20 05:41:17 +00:00
|
|
|
homepage.workspace = true
|
|
|
|
repository.workspace = true
|
|
|
|
keywords.workspace = true
|
|
|
|
license.workspace = true
|
|
|
|
rust-version.workspace = true
|
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"]
|
|
|
|
|
2021-06-04 05:19:36 +00:00
|
|
|
[lib]
|
|
|
|
|
|
|
|
[features]
|
2022-11-14 18:49:39 +00:00
|
|
|
default = ["gles"]
|
2021-06-16 15:42:37 +00:00
|
|
|
metal = ["naga/msl-out", "block", "foreign-types"]
|
2022-07-15 15:20:03 +00:00
|
|
|
vulkan = ["naga/spv-out", "ash", "gpu-alloc", "gpu-descriptor", "libloading", "smallvec"]
|
2021-06-18 04:38:27 +00:00
|
|
|
gles = ["naga/glsl-out", "glow", "egl", "libloading"]
|
2022-03-12 17:14:18 +00:00
|
|
|
dx11 = ["naga/hlsl-out", "native", "libloading", "winapi/d3d11", "winapi/d3d11_1", "winapi/d3d11_2", "winapi/d3d11sdklayers", "winapi/dxgi1_6"]
|
2021-07-09 19:34:37 +00:00
|
|
|
dx12 = ["naga/hlsl-out", "native", "bit-set", "range-alloc", "winapi/d3d12", "winapi/d3d12shader", "winapi/d3d12sdklayers", "winapi/dxgi1_6"]
|
2021-07-14 16:40:01 +00:00
|
|
|
renderdoc = ["libloading", "renderdoc-sys"]
|
2022-01-25 10:35:45 +00:00
|
|
|
emscripten = ["gles"]
|
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]
|
2022-10-20 05:41:17 +00:00
|
|
|
bitflags.workspace = true
|
|
|
|
parking_lot.workspace = true
|
|
|
|
profiling.workspace = true
|
|
|
|
raw-window-handle.workspace = true
|
|
|
|
thiserror.workspace = true
|
2021-06-05 05:44:21 +00:00
|
|
|
|
2021-06-11 06:09:03 +00:00
|
|
|
# backends common
|
2022-10-20 05:41:17 +00:00
|
|
|
arrayvec.workspace = true
|
|
|
|
fxhash.workspace = true
|
|
|
|
log.workspace = true
|
|
|
|
renderdoc-sys = { workspace = true, optional = true }
|
2021-07-14 16:40:01 +00:00
|
|
|
|
2021-06-11 06:09:03 +00:00
|
|
|
# backend: Metal
|
2022-10-20 05:41:17 +00:00
|
|
|
block = { workspace = true, optional = true }
|
|
|
|
foreign-types = { workspace = true, optional = true }
|
2021-07-14 16:40:01 +00:00
|
|
|
|
2021-06-11 06:09:03 +00:00
|
|
|
# backend: Vulkan
|
2022-10-20 05:41:17 +00:00
|
|
|
ash = { workspace = true, optional = true }
|
|
|
|
gpu-alloc = { workspace = true, optional = true }
|
|
|
|
gpu-descriptor = { workspace = true, optional = true }
|
|
|
|
smallvec = { workspace = true, optional = true, features = ["union"] }
|
2021-07-14 16:40:01 +00:00
|
|
|
|
2021-06-18 04:38:27 +00:00
|
|
|
# backend: Gles
|
2022-10-20 05:41:17 +00:00
|
|
|
glow = { workspace = true, optional = true }
|
2021-07-14 16:40:01 +00:00
|
|
|
|
2021-07-05 06:17:09 +00:00
|
|
|
# backend: Dx12
|
2022-10-20 05:41:17 +00:00
|
|
|
bit-set = { workspace = true, optional = true }
|
|
|
|
range-alloc = { workspace = true, optional = true }
|
2021-06-18 04:38:27 +00:00
|
|
|
|
2021-08-18 19:06:21 +00:00
|
|
|
[dependencies.wgt]
|
2022-10-20 05:41:17 +00:00
|
|
|
workspace = true
|
2021-08-18 19:06:21 +00:00
|
|
|
|
2021-06-18 04:38:27 +00:00
|
|
|
[target.'cfg(not(target_arch = "wasm32"))'.dependencies]
|
2022-10-20 05:41:17 +00:00
|
|
|
egl = { workspace = true, features = ["dynamic"], optional = true }
|
|
|
|
libloading = { workspace = true, optional = true }
|
2021-06-08 15:46:53 +00:00
|
|
|
|
2022-01-25 10:35:45 +00:00
|
|
|
[target.'cfg(target_os = "emscripten")'.dependencies]
|
2022-10-20 05:41:17 +00:00
|
|
|
egl = { workspace = true, 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
|
2022-10-20 05:41:17 +00:00
|
|
|
libloading = { workspace = true, optional = true }
|
2022-01-25 10:35:45 +00:00
|
|
|
|
2021-06-16 15:42:37 +00:00
|
|
|
[target.'cfg(windows)'.dependencies]
|
2022-10-20 05:41:17 +00:00
|
|
|
winapi = { workspace = true, features = ["libloaderapi", "windef", "winuser", "dcomp"] }
|
|
|
|
native = { workspace = true, features = ["libloading"], optional = true }
|
2021-06-16 15:42:37 +00:00
|
|
|
|
|
|
|
[target.'cfg(any(target_os="macos", target_os="ios"))'.dependencies]
|
2022-10-20 05:41:17 +00:00
|
|
|
mtl.workspace = true
|
|
|
|
objc.workspace = true
|
|
|
|
core-graphics-types.workspace = true
|
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]
|
2022-10-20 05:41:17 +00:00
|
|
|
wasm-bindgen.workspace = true
|
|
|
|
web-sys = { workspace = true, features = ["Window", "HtmlCanvasElement", "WebGl2RenderingContext", "OffscreenCanvas"] }
|
|
|
|
js-sys.workspace = true
|
2021-10-07 20:18:09 +00:00
|
|
|
|
2022-06-04 16:05:40 +00:00
|
|
|
[target.'cfg(target_os = "android")'.dependencies]
|
2022-10-20 05:41:17 +00:00
|
|
|
android_system_properties.workspace = true
|
2022-06-04 16:05:40 +00:00
|
|
|
|
2021-06-05 05:44:21 +00:00
|
|
|
[dependencies.naga]
|
2022-10-20 05:41:17 +00:00
|
|
|
workspace = true
|
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]
|
2022-10-20 05:41:17 +00:00
|
|
|
workspace = true
|
2021-06-08 18:58:48 +00:00
|
|
|
features = ["wgsl-in"]
|
|
|
|
|
|
|
|
[dev-dependencies]
|
2022-10-20 05:41:17 +00:00
|
|
|
env_logger.workspace = true
|
|
|
|
winit.workspace = true # for "halmark" example
|
2022-01-06 17:02:44 +00:00
|
|
|
|
|
|
|
[target.'cfg(not(target_arch = "wasm32"))'.dev-dependencies]
|
2022-10-20 05:41:17 +00:00
|
|
|
glutin.workspace = true # for "gles" example
|