summaryrefslogtreecommitdiffstats
path: root/third_party/rust/wgpu-hal/Cargo.toml
diff options
context:
space:
mode:
Diffstat (limited to 'third_party/rust/wgpu-hal/Cargo.toml')
-rw-r--r--third_party/rust/wgpu-hal/Cargo.toml130
1 files changed, 130 insertions, 0 deletions
diff --git a/third_party/rust/wgpu-hal/Cargo.toml b/third_party/rust/wgpu-hal/Cargo.toml
new file mode 100644
index 0000000000..b5d6b6e645
--- /dev/null
+++ b/third_party/rust/wgpu-hal/Cargo.toml
@@ -0,0 +1,130 @@
+[package]
+name = "wgpu-hal"
+version = "0.14.0"
+authors = ["wgpu 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.60"
+
+[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"]
+
+[lib]
+
+[features]
+default = []
+metal = ["naga/msl-out", "block", "foreign-types"]
+vulkan = ["naga/spv-out", "ash", "gpu-alloc", "gpu-descriptor", "libloading", "smallvec"]
+gles = ["naga/glsl-out", "glow", "egl", "libloading"]
+dx11 = ["naga/hlsl-out", "native", "libloading", "winapi/d3d11", "winapi/d3d11_1", "winapi/d3d11_2", "winapi/d3d11sdklayers", "winapi/dxgi1_6"]
+dx12 = ["naga/hlsl-out", "native", "bit-set", "range-alloc", "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"]
+renderdoc = ["libloading", "renderdoc-sys"]
+emscripten = ["gles"]
+
+[[example]]
+name = "halmark"
+
+[[example]]
+name = "raw-gles"
+required-features = ["gles"]
+
+[dependencies]
+bitflags = "1"
+parking_lot = ">=0.11,<0.13"
+profiling = { version = "1", default-features = false }
+raw-window-handle = "0.5"
+thiserror = "1"
+
+# backends common
+arrayvec = "0.7"
+fxhash = "0.2.1"
+log = "0.4"
+renderdoc-sys = { version = "0.7.1", optional = true }
+
+# backend: Metal
+block = { version = "0.1", optional = true }
+foreign-types = { version = "0.3", optional = true }
+
+# backend: Vulkan
+ash = { version = "0.37.1", optional = true }
+gpu-alloc = { version = "0.5", optional = true }
+gpu-descriptor = { version = "0.2", optional = true }
+smallvec = { version = "1", optional = true, features = ["union"] }
+
+# backend: Gles
+glow = { git = "https://github.com/grovesNL/glow", rev = "c8a011fcd57a5c68cc917ed394baa484bdefc909", optional = true }
+
+# backend: Dx12
+bit-set = { version = "0.5", optional = true }
+range-alloc = { version = "0.1", optional = true }
+gpu-allocator = { version = "0.21", default_features = false, features = ["d3d12", "windows", "public-winapi"], optional = true }
+
+[dependencies.wgt]
+package = "wgpu-types"
+path = "../wgpu-types"
+
+[target.'cfg(not(target_arch = "wasm32"))'.dependencies]
+egl = { package = "khronos-egl", version = "4.1", features = ["dynamic"], optional = true }
+libloading = { version = "0.7", optional = true }
+
+[target.'cfg(target_os = "emscripten")'.dependencies]
+egl = { package = "khronos-egl", version = "4.1", 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", optional = true }
+
+[target.'cfg(windows)'.dependencies]
+winapi = { version = "0.3", features = ["profileapi", "libloaderapi", "windef", "winuser", "dcomp"] }
+native = { package = "d3d12", version = "0.5.0", features = ["libloading"], optional = true }
+
+[target.'cfg(any(target_os="macos", target_os="ios"))'.dependencies]
+mtl = { package = "metal", version = "0.24.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.83"
+web-sys = { version = "0.3.60", features = ["Window", "HtmlCanvasElement", "WebGl2RenderingContext", "OffscreenCanvas"] }
+js-sys = "0.3.60"
+
+[target.'cfg(unix)'.dependencies]
+libc = "0.2"
+
+[target.'cfg(target_os = "android")'.dependencies]
+android_system_properties = "0.1.1"
+
+[dependencies.naga]
+git = "https://github.com/gfx-rs/naga"
+rev = "e7fc8e6"
+version = "0.10"
+features = ["clone"]
+
+# DEV dependencies
+[dev-dependencies.naga]
+git = "https://github.com/gfx-rs/naga"
+rev = "e7fc8e6"
+version = "0.10"
+features = ["wgsl-in"]
+
+[dev-dependencies]
+env_logger = "0.9"
+winit = "0.27.1" # for "halmark" example
+
+[target.'cfg(not(target_arch = "wasm32"))'.dev-dependencies]
+glutin = "0.29.1" # for "gles" example