-
Notifications
You must be signed in to change notification settings - Fork 27
/
Copy pathCargo.toml
executable file
·49 lines (44 loc) · 1.26 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
[package]
name = "wgpu-in-web"
version = "0.1.0"
authors = ["Jinlei Li <[email protected]>"]
edition.workspace = true
rust-version.workspace = true
[lib]
# crate-type = ["cdylib"]
crate-type = ["cdylib", "rlib"]
[features]
default = []
web_rwh = ["app-surface/web_rwh"]
[dependencies]
# 为何这里的 web_rwh features 会影响其他 package 中的 app-surface 也开启此配置?
app-surface = { workspace = true, features = [
# "web_rwh",
] }
bytemuck.workspace = true
cfg-if.workspace = true
env_logger.workspace = true
flume.workspace = true
glam.workspace = true
log.workspace = true
rand = "0.8"
# 使 rand 支持 wasm 环境
# https://github.com/rust-random/rand/blob/585b29f2a9b21170c56fc9a0e29cff664491561c/README.md?plain=1#L113
getrandom = { version = "*", features = ["js"] }
utils.workspace = true
wgpu.workspace = true
# web 环境不使用 winit
[target.'cfg(not(target_arch = "wasm32"))'.dependencies]
winit.workspace = true
[target.'cfg(target_arch = "wasm32")'.dependencies]
console_error_panic_hook.workspace = true
console_log.workspace = true
js-sys.workspace = true
wasm-bindgen.workspace = true
wasm-bindgen-futures.workspace = true
web-sys = { workspace = true, features = [
"Document",
"Window",
"Element",
"HtmlCanvasElement",
] }