forked from gfx-rs/wgpu-native
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Cargo.toml
162 lines (126 loc) · 4.66 KB
/
Cargo.toml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
[package]
name = "wgpu-native"
version = "0.0.0"
authors = [
"Dzmitry Malyshau <[email protected]>",
"Joshua Groves <[email protected]>",
"Noah Charlton <[email protected]>",
"Almar Klein <[email protected]>",
"Rajesh Malviya <[email protected]>",
]
edition = "2021"
description = "Native WebGPU implementation based on wgpu-core"
homepage = "https://github.com/gfx-rs/wgpu-native"
repository = "https://github.com/gfx-rs/wgpu-native"
keywords = ["graphics"]
license = "MIT OR Apache-2.0"
[workspace]
members = ["."]
default-members = ["."]
resolver = "2"
[workspace.dependencies.wgc]
package = "wgpu-core"
git = "https://github.com/gfx-rs/wgpu"
tag = "v22.1.0"
[workspace.dependencies.wgt]
package = "wgpu-types"
git = "https://github.com/gfx-rs/wgpu"
tag = "v22.1.0"
[workspace.dependencies.hal]
package = "wgpu-hal"
git = "https://github.com/gfx-rs/wgpu"
tag = "v22.1.0"
[workspace.dependencies.naga]
package = "naga"
git = "https://github.com/gfx-rs/wgpu"
tag = "v22.1.0"
[lib]
crate-type = ["cdylib", "staticlib"]
[features]
default = ["wgsl", "spirv", "glsl", "dx12", "metal"]
#! ### Backends
# --------------------------------------------------------------------
#! ⚠️ WIP: Not all backends can be manually configured today.
#! On Windows, Linux & Android the Vulkan & GLES backends are always enabled.
#! See [#3514](https://github.com/gfx-rs/wgpu/issues/3514) for more details.
## Enables the DX12 backend on Windows.
dx12 = ["wgc/dx12"]
## Enables the Metal backend on macOS & iOS.
metal = ["wgc/metal"]
## Enables the GLES backend via [ANGLE](https://github.com/google/angle) on macOS using.
angle = ["wgc/gles"]
## Enables the Vulkan backend on macOS & iOS.
vulkan-portability = ["wgc/vulkan"]
#! **Note:** In the documentation, if you see that an item depends on a backend,
#! it means that the item is only available when that backend is enabled _and_ the backend
#! is supported on the current platform.
#! ### Shading language support
# --------------------------------------------------------------------
## Enable accepting SPIR-V shaders as input.
spirv = ["naga/spv-in", "wgc/spirv"]
## Enable accepting GLSL shaders as input.
glsl = ["naga/glsl-in", "wgc/glsl"]
## Enable accepting WGSL shaders as input.
wgsl = ["wgc/wgsl"]
#! ### Logging & Tracing
# --------------------------------------------------------------------
#! The following features do not have any effect on the WebGPU backend.
## Apply run-time checks, even in release builds. These are in addition
## to the validation carried out at public APIs in all builds.
strict_asserts = ["wgc/strict_asserts", "wgt/strict_asserts"]
## Log all API entry points at info instead of trace level.
api_log_info = ["wgc/api_log_info"]
## Enables serialization via `serde` on common wgpu types.
serde = ["dep:serde", "wgc/serde"]
# Uncomment once upstream adds it again — https://github.com/gfx-rs/wgpu/issues/5974
# ## Allow writing of trace capture files. See [`Adapter::request_device`].
# trace = ["serde", "wgc/trace"]
## Allow deserializing of trace capture files that were written with the `trace` feature.
## To replay a trace file use the [wgpu player](https://github.com/gfx-rs/wgpu/tree/trunk/player).
replay = ["serde", "wgc/replay"]
[dependencies.wgc]
workspace = true
features = ["raw-window-handle"]
# Enable `wgc` by default on macOS and iOS to allow the `metal` crate feature to
# enable the Metal backend while being no-op on other targets.
[target.'cfg(any(target_os = "macos", target_os = "ios"))'.dependencies.wgc]
workspace = true
# We want the wgpu-core Direct3D backend and OpenGL (via WGL) on Windows.
[target.'cfg(windows)'.dependencies.wgc]
workspace = true
features = ["gles"]
# We want the wgpu-core Vulkan backend on Unix (but not macOS, iOS) and Windows.
[target.'cfg(any(windows, all(unix, not(target_os = "ios"), not(target_os = "macos"))))'.dependencies.wgc]
workspace = true
features = ["vulkan"]
# We want the wgpu-core GLES backend on Unix (but not macOS, iOS).
[target.'cfg(all(unix, not(target_os = "ios"), not(target_os = "macos")))'.dependencies.wgc]
workspace = true
features = ["gles"]
[dependencies.hal]
workspace = true
[target.'cfg(all(unix, not(target_os = "ios"), not(target_os = "macos")))'.dependencies]
hal = { workspace = true, features = ["renderdoc"] }
[target.'cfg(windows)'.dependencies]
hal = { workspace = true, features = [
"dxc_shader_compiler",
"renderdoc",
"windows_rs",
] }
[dependencies.wgt]
workspace = true
[dependencies.naga]
workspace = true
optional = true
[dependencies.serde]
version = "1"
optional = true
[dependencies]
raw-window-handle = "0.6.0"
paste = "1"
log = "0.4"
thiserror = "1"
parking_lot = "0.12"
smallvec = "1"
[build-dependencies]
bindgen = "0.70"