Skip to content

Commit

Permalink
更新 wasm32 的依赖
Browse files Browse the repository at this point in the history
  • Loading branch information
jinleili committed Feb 14, 2025
1 parent 2b9b116 commit 56c5a44
Show file tree
Hide file tree
Showing 26 changed files with 349 additions and 681 deletions.
532 changes: 172 additions & 360 deletions Cargo.lock

Large diffs are not rendered by default.

7 changes: 3 additions & 4 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ env_logger = "0.11"
flume = "0.11"
instant = "0.1.13"
log = "0.4"
pollster = "0.3"
pollster = "0.4"
parking_lot = "0.12"
rayon = "1.8"
tobj = "3.2"
Expand All @@ -42,11 +42,10 @@ console_error_panic_hook = "0.1.7"
console_log = "1.0"
fern = "0.7"
reqwest = { version = "0.11" }
web-sys = "0.3.77"
web-sys = { version = "0.3.77", default-features = false }
wasm-bindgen = "0.2.100"
js-sys = "0.3.77"
js-sys = { version = "0.3.77", default-features = false }
wasm-bindgen-futures = "0.4.50"
web-time = "1"

# build-dependencies
anyhow = "1.0"
Expand Down
1 change: 0 additions & 1 deletion code/beginner/tutorial1-window/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -30,5 +30,4 @@ fern.workspace = true
js-sys.workspace = true
wasm-bindgen.workspace = true
wasm-bindgen-futures.workspace = true
web-time.workspace = true
web-sys = { workspace = true, features = ["Document", "Window", "Element"] }
1 change: 0 additions & 1 deletion code/beginner/tutorial2-surface/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@ fern.workspace = true
js-sys.workspace = true
wasm-bindgen.workspace = true
wasm-bindgen-futures.workspace = true
web-time.workspace = true
web-sys = { workspace = true, features = ["Document", "Window", "Element"] }

[[bin]]
Expand Down
10 changes: 0 additions & 10 deletions code/beginner/tutorial3-pipeline/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -17,16 +17,6 @@ wgpu = { workspace = true }
app-surface = { workspace = true }
utils.workspace = true

[target.'cfg(target_arch = "wasm32")'.dependencies]
console_error_panic_hook.workspace = true
console_log.workspace = true
fern.workspace = true
js-sys.workspace = true
wasm-bindgen.workspace = true
wasm-bindgen-futures.workspace = true
web-time.workspace = true
web-sys = { workspace = true, features = ["Document", "Window", "Element"] }

[[bin]]
name = "tutorial3-challenge"
path = "src/challenge.rs"
11 changes: 0 additions & 11 deletions code/beginner/tutorial4-buffer/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -19,17 +19,6 @@ utils.workspace = true
# NEW!
bytemuck = { workspace = true, features = ["derive"] }


[target.'cfg(target_arch = "wasm32")'.dependencies]
console_error_panic_hook.workspace = true
console_log.workspace = true
fern.workspace = true
js-sys.workspace = true
wasm-bindgen.workspace = true
wasm-bindgen-futures.workspace = true
web-time.workspace = true
web-sys = { workspace = true, features = ["Document", "Window", "Element"] }

[build-dependencies]
anyhow.workspace = true
fs_extra.workspace = true
Expand Down
10 changes: 0 additions & 10 deletions code/beginner/tutorial5-textures/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -23,16 +23,6 @@ utils.workspace = true
workspace = true
features = ["png", "jpeg"]

[target.'cfg(target_arch = "wasm32")'.dependencies]
console_error_panic_hook.workspace = true
console_log.workspace = true
fern.workspace = true
js-sys.workspace = true
wasm-bindgen.workspace = true
wasm-bindgen-futures.workspace = true
web-time.workspace = true
web-sys = { workspace = true, features = ["Document", "Window", "Element"] }

[build-dependencies]
anyhow.workspace = true
fs_extra.workspace = true
Expand Down
10 changes: 0 additions & 10 deletions code/beginner/tutorial6-uniforms/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -22,16 +22,6 @@ utils.workspace = true
workspace = true
features = ["png", "jpeg"]

[target.'cfg(target_arch = "wasm32")'.dependencies]
console_error_panic_hook.workspace = true
console_log.workspace = true
fern.workspace = true
js-sys.workspace = true
wasm-bindgen.workspace = true
wasm-bindgen-futures.workspace = true
web-time.workspace = true
web-sys = { workspace = true, features = ["Document", "Window", "Element"] }

[build-dependencies]
anyhow.workspace = true
fs_extra.workspace = true
Expand Down
10 changes: 0 additions & 10 deletions code/beginner/tutorial7-instancing/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -22,16 +22,6 @@ utils.workspace = true
workspace = true
features = ["png", "jpeg"]

[target.'cfg(target_arch = "wasm32")'.dependencies]
console_error_panic_hook.workspace = true
console_log.workspace = true
fern.workspace = true
js-sys.workspace = true
wasm-bindgen.workspace = true
wasm-bindgen-futures.workspace = true
web-time.workspace = true
web-sys = { workspace = true, features = ["Document", "Window", "Element"] }

[build-dependencies]
anyhow.workspace = true
fs_extra.workspace = true
Expand Down
10 changes: 0 additions & 10 deletions code/beginner/tutorial8-depth/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -25,16 +25,6 @@ utils.workspace = true
workspace = true
features = ["png", "jpeg"]

[target.'cfg(target_arch = "wasm32")'.dependencies]
console_error_panic_hook.workspace = true
console_log.workspace = true
fern.workspace = true
js-sys.workspace = true
wasm-bindgen.workspace = true
wasm-bindgen-futures.workspace = true
web-time.workspace = true
web-sys = { workspace = true, features = ["Document", "Window", "Element"] }

[build-dependencies]
anyhow.workspace = true
fs_extra.workspace = true
Expand Down
14 changes: 6 additions & 8 deletions code/beginner/tutorial9-models/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -24,15 +24,13 @@ workspace = true
features = ["png", "jpeg"]

[target.'cfg(target_arch = "wasm32")'.dependencies]
console_error_panic_hook.workspace = true
console_log.workspace = true
fern.workspace = true
js-sys.workspace = true
reqwest.workspace = true
wasm-bindgen.workspace = true
wasm-bindgen-futures.workspace = true
web-time.workspace = true
web-sys = { workspace = true, features = ["Document", "Window", "Element"] }
web-sys = { workspace = true, features = [
"Document",
"Window",
"Element",
"Location",
] }

[build-dependencies]
anyhow.workspace = true
Expand Down
1 change: 0 additions & 1 deletion code/integration-and-debugging/wgpu_in_web/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@ wgpu.workspace = true
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
Expand Down
12 changes: 1 addition & 11 deletions code/intermediate/compute-pipeline/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -17,14 +17,4 @@ log.workspace = true
winit.workspace = true
wgpu.workspace = true
png = "0.17"
utils.workspace = true

[target.'cfg(target_arch = "wasm32")'.dependencies]
console_error_panic_hook.workspace = true
console_log.workspace = true
fern.workspace = true
js-sys.workspace = true
wasm-bindgen.workspace = true
wasm-bindgen-futures.workspace = true
web-time.workspace = true
web-sys = { workspace = true, features = ["Document", "Window", "Element"] }
utils.workspace = true
15 changes: 6 additions & 9 deletions code/intermediate/hdr/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -18,23 +18,20 @@ anyhow = "1.0"
tobj = { version = "3.2", features = ["async"] }
instant = "0.1"
# image 0.25.5 版本中, read_image_transform 被改成了私有方法, 所以使用 0.24 版本
image = { version = "=0.24.6", features = ["png", "jpeg", "hdr"] }
image = { version = "=0.24.6", default-features = false, features = [
"png",
"jpeg",
"hdr",
] }

[target.'cfg(target_arch = "wasm32")'.dependencies]
console_error_panic_hook.workspace = true
console_log.workspace = true
fern.workspace = true
js-sys.workspace = true
wasm-bindgen.workspace = true
wasm-bindgen-futures.workspace = true
web-time.workspace = true
reqwest = { workspace = true }
web-sys = { workspace = true, features = [
"Document",
"Window",
"Element",
"Location",
] }
reqwest = { workspace = true }

[build-dependencies]
anyhow.workspace = true
Expand Down
12 changes: 1 addition & 11 deletions code/intermediate/hilbert-curve/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -13,14 +13,4 @@ log.workspace = true
winit.workspace = true
wgpu.workspace = true
glam.workspace = true
utils.workspace = true

[target.'cfg(target_arch = "wasm32")'.dependencies]
console_error_panic_hook.workspace = true
console_log.workspace = true
fern.workspace = true
js-sys.workspace = true
wasm-bindgen.workspace = true
wasm-bindgen-futures.workspace = true
web-time.workspace = true
web-sys = { workspace = true, features = ["Document", "Window", "Element"] }
utils.workspace = true
14 changes: 6 additions & 8 deletions code/intermediate/tutorial10-lighting/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -24,15 +24,13 @@ workspace = true
features = ["png", "jpeg"]

[target.'cfg(target_arch = "wasm32")'.dependencies]
console_error_panic_hook.workspace = true
console_log.workspace = true
fern.workspace = true
js-sys.workspace = true
reqwest.workspace = true
wasm-bindgen.workspace = true
wasm-bindgen-futures.workspace = true
web-time.workspace = true
web-sys = { workspace = true, features = ["Document", "Window", "Element"] }
web-sys = { workspace = true, features = [
"Document",
"Window",
"Element",
"Location",
] }

[build-dependencies]
anyhow.workspace = true
Expand Down
7 changes: 0 additions & 7 deletions code/intermediate/tutorial11-normals/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -24,14 +24,7 @@ workspace = true
features = ["png", "jpeg"]

[target.'cfg(target_arch = "wasm32")'.dependencies]
console_error_panic_hook.workspace = true
console_log.workspace = true
fern.workspace = true
js-sys.workspace = true
reqwest.workspace = true
wasm-bindgen.workspace = true
wasm-bindgen-futures.workspace = true
web-time.workspace = true
web-sys = { workspace = true, features = [
"Document",
"Window",
Expand Down
7 changes: 0 additions & 7 deletions code/intermediate/tutorial12-camera/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -24,14 +24,7 @@ workspace = true
features = ["png", "jpeg"]

[target.'cfg(target_arch = "wasm32")'.dependencies]
console_error_panic_hook.workspace = true
console_log.workspace = true
fern.workspace = true
js-sys.workspace = true
reqwest.workspace = true
wasm-bindgen.workspace = true
wasm-bindgen-futures.workspace = true
web-time.workspace = true
web-sys = { workspace = true, features = [
"Document",
"Window",
Expand Down
2 changes: 0 additions & 2 deletions code/intermediate/tutorial13-terrain/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -27,12 +27,10 @@ workspace = true
features = ["png", "jpeg"]

[target.'cfg(target_arch = "wasm32")'.dependencies]
console_error_panic_hook.workspace = true
console_log.workspace = true
reqwest.workspace = true
wasm-bindgen.workspace = true
wasm-bindgen-futures.workspace = true
web-time.workspace = true
web-sys = { workspace = true, features = [
"Document",
"Window",
Expand Down
12 changes: 1 addition & 11 deletions code/intermediate/vertex-animation/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -16,14 +16,4 @@ wgpu.workspace = true
glam.workspace = true
png = "0.17"
utils.workspace = true
rand = "0.8"

[target.'cfg(target_arch = "wasm32")'.dependencies]
console_error_panic_hook.workspace = true
console_log.workspace = true
fern.workspace = true
js-sys.workspace = true
web-sys = { workspace = true, features = ["Document", "Window", "Element"] }
wasm-bindgen.workspace = true
wasm-bindgen-futures.workspace = true
web-time.workspace = true
rand = "0.8"
5 changes: 4 additions & 1 deletion code/showcase/compute/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -24,4 +24,7 @@ anyhow.workspace = true
fs_extra.workspace = true
glob.workspace = true
rayon.workspace = true
naga = { version = "23", features = ["glsl-in", "wgsl-out"] }
naga = { version = "24", default-features = false, features = [
"glsl-in",
"wgsl-out",
] }
Loading

0 comments on commit 56c5a44

Please sign in to comment.