Skip to content

Commit ac26288

Browse files
authored
Bring wasm up to date (#210)
1 parent 2c78e08 commit ac26288

7 files changed

Lines changed: 1844 additions & 231 deletions

File tree

.cargo/config.toml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
[target.wasm32-unknown-unknown]
2+
rustflags = ["--cfg", 'getrandom_backend="wasm_js"']

Cargo.lock

Lines changed: 6 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,6 @@ bevy = { git = "https://github.com/processing/bevy", branch = "main", default-fe
4848
"wayland",
4949
"webgl2",
5050
"x11",
51-
"file_watcher",
5251
"shader_format_wesl",
5352
"free_camera",
5453
"pan_camera",

crates/processing_render/Cargo.toml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,9 @@ processing_core = { workspace = true }
3030
[build-dependencies]
3131
wesl = { workspace = true, features = ["package"] }
3232

33+
[target.'cfg(not(target_arch = "wasm32"))'.dependencies]
34+
bevy = { workspace = true, features = ["file_watcher"] }
35+
3336
[target.'cfg(target_os = "macos")'.dependencies]
3437
objc2 = { version = "0.6", default-features = false }
3538
objc2-app-kit = { version = "0.3", features = ["NSWindow", "NSView"] }

crates/processing_wasm/Cargo.toml

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,8 @@ crate-type = ["cdylib", "rlib"]
1010
workspace = true
1111

1212
[dependencies]
13-
processing_render = { workspace = true }
13+
processing = { path = "../..", default-features = false }
14+
bevy = { workspace = true, features = ["webgpu"] }
1415
wasm-bindgen = "0.2"
1516
wasm-bindgen-futures = "0.4"
1617
js-sys = "0.3"
@@ -26,5 +27,7 @@ features = [
2627
"console",
2728
]
2829

29-
[dependencies.bevy]
30-
workspace = true
30+
[target.'cfg(target_arch = "wasm32")'.dependencies]
31+
getrandom_040 = { package = "getrandom", version = "0.4", features = ["wasm_js"] }
32+
getrandom_030 = { package = "getrandom", version = "0.3", features = ["wasm_js"] }
33+
getrandom_020 = { package = "getrandom", version = "0.2", features = ["js"] }

0 commit comments

Comments
 (0)