Skip to content

Commit 642e016

Browse files
Bump to uuid 1.13.1 and enable js on wasm targets (#17689)
# Objective - Fixes CI failure due to `uuid` 1.13 using the new version of `getrandom` which requires using a new API to work on Wasm. ## Solution - Based on [`uuid` 1.13 release notes](https://github.com/uuid-rs/uuid/releases/tag/1.13.0) I've enabled the `js` feature on `wasm32`. This will need to be revisited once #17499 is up for review - Updated minimum `uuid` version to 1.13.1, which fixes a separate issue with `target_feature = atomics` on `wasm`. ## Testing - `cargo check --target wasm32-unknown-unknown`
1 parent 8c7f1b3 commit 642e016

File tree

6 files changed

+22
-6
lines changed

6 files changed

+22
-6
lines changed

crates/bevy_animation/Cargo.toml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,10 +40,13 @@ thiserror = { version = "2", default-features = false }
4040
derive_more = { version = "1", default-features = false, features = ["from"] }
4141
either = "1.13"
4242
thread_local = "1"
43-
uuid = { version = "1.7", features = ["v4"] }
43+
uuid = { version = "1.13.1", features = ["v4"] }
4444
smallvec = "1"
4545
tracing = { version = "0.1", default-features = false, features = ["std"] }
4646

47+
[target.'cfg(target_arch = "wasm32")'.dependencies]
48+
uuid = { version = "1.13.1", default-features = false, features = ["js"] }
49+
4750
[lints]
4851
workspace = true
4952

crates/bevy_asset/Cargo.toml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ ron = "0.8"
4949
serde = { version = "1", features = ["derive"] }
5050
thiserror = { version = "2", default-features = false }
5151
derive_more = { version = "1", default-features = false, features = ["from"] }
52-
uuid = { version = "1.0", features = ["v4"] }
52+
uuid = { version = "1.13.1", features = ["v4"] }
5353
tracing = { version = "0.1", default-features = false, features = ["std"] }
5454

5555
[target.'cfg(target_os = "android")'.dependencies]
@@ -64,6 +64,7 @@ web-sys = { version = "0.3", features = [
6464
] }
6565
wasm-bindgen-futures = "0.4"
6666
js-sys = "0.3"
67+
uuid = { version = "1.13.1", default-features = false, features = ["js"] }
6768

6869
[target.'cfg(not(target_arch = "wasm32"))'.dependencies]
6970
notify-debouncer-full = { version = "0.4.0", optional = true }

crates/bevy_picking/Cargo.toml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,9 +32,12 @@ bevy_platform_support = { path = "../bevy_platform_support", version = "0.16.0-d
3232

3333
# other
3434
crossbeam-channel = { version = "0.5", optional = true }
35-
uuid = { version = "1.1", features = ["v4"] }
35+
uuid = { version = "1.13.1", features = ["v4"] }
3636
tracing = { version = "0.1", default-features = false, features = ["std"] }
3737

38+
[target.'cfg(target_arch = "wasm32")'.dependencies]
39+
uuid = { version = "1.13.1", default-features = false, features = ["js"] }
40+
3841
[lints]
3942
workspace = true
4043

crates/bevy_reflect/Cargo.toml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -111,13 +111,16 @@ petgraph = { version = "0.6", features = ["serde-1"], optional = true }
111111
smol_str = { version = "0.2.0", default-features = false, features = [
112112
"serde",
113113
], optional = true }
114-
uuid = { version = "1.0", default-features = false, optional = true, features = [
114+
uuid = { version = "1.13.1", default-features = false, optional = true, features = [
115115
"v4",
116116
"serde",
117117
] }
118118
variadics_please = "1.1"
119119
wgpu-types = { version = "23", features = ["serde"], optional = true }
120120

121+
[target.'cfg(target_arch = "wasm32")'.dependencies]
122+
uuid = { version = "1.13.1", default-features = false, features = ["js"] }
123+
121124
[dev-dependencies]
122125
ron = "0.8.0"
123126
rmp-serde = "1.1"

crates/bevy_reflect/derive/Cargo.toml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,10 @@ bevy_macro_utils = { path = "../../bevy_macro_utils", version = "0.16.0-dev" }
2323
proc-macro2 = "1.0"
2424
quote = "1.0"
2525
syn = { version = "2.0", features = ["full"] }
26-
uuid = { version = "1.1", features = ["v4"] }
26+
uuid = { version = "1.13.1", features = ["v4"] }
27+
28+
[target.'cfg(target_arch = "wasm32")'.dependencies]
29+
uuid = { version = "1.13.1", default-features = false, features = ["js"] }
2730

2831
[lints]
2932
workspace = true

crates/bevy_scene/Cargo.toml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,10 +35,13 @@ bevy_platform_support = { path = "../bevy_platform_support", version = "0.16.0-d
3535

3636
# other
3737
serde = { version = "1.0", features = ["derive"], optional = true }
38-
uuid = { version = "1.1", features = ["v4"] }
38+
uuid = { version = "1.13.1", features = ["v4"] }
3939
thiserror = { version = "2", default-features = false }
4040
derive_more = { version = "1", default-features = false, features = ["from"] }
4141

42+
[target.'cfg(target_arch = "wasm32")'.dependencies]
43+
uuid = { version = "1.13.1", default-features = false, features = ["js"] }
44+
4245
[dev-dependencies]
4346
postcard = { version = "1.0", features = ["alloc"] }
4447
bincode = "1.3"

0 commit comments

Comments
 (0)