Skip to content

Commit

Permalink
Bump to uuid 1.13.1 and enable js on wasm targets (bevyengine#1…
Browse files Browse the repository at this point in the history
…7689)

# 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 bevyengine#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`
  • Loading branch information
bushrat011899 authored and joshua-holmes committed Feb 5, 2025
1 parent aa5b094 commit 8cd8215
Show file tree
Hide file tree
Showing 6 changed files with 22 additions and 6 deletions.
5 changes: 4 additions & 1 deletion crates/bevy_animation/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -40,10 +40,13 @@ thiserror = { version = "2", default-features = false }
derive_more = { version = "1", default-features = false, features = ["from"] }
either = "1.13"
thread_local = "1"
uuid = { version = "1.7", features = ["v4"] }
uuid = { version = "1.13.1", features = ["v4"] }
smallvec = "1"
tracing = { version = "0.1", default-features = false, features = ["std"] }

[target.'cfg(target_arch = "wasm32")'.dependencies]
uuid = { version = "1.13.1", default-features = false, features = ["js"] }

[lints]
workspace = true

Expand Down
3 changes: 2 additions & 1 deletion crates/bevy_asset/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ ron = "0.8"
serde = { version = "1", features = ["derive"] }
thiserror = { version = "2", default-features = false }
derive_more = { version = "1", default-features = false, features = ["from"] }
uuid = { version = "1.0", features = ["v4"] }
uuid = { version = "1.13.1", features = ["v4"] }
tracing = { version = "0.1", default-features = false, features = ["std"] }

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

[target.'cfg(not(target_arch = "wasm32"))'.dependencies]
notify-debouncer-full = { version = "0.4.0", optional = true }
Expand Down
5 changes: 4 additions & 1 deletion crates/bevy_picking/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,12 @@ bevy_platform_support = { path = "../bevy_platform_support", version = "0.16.0-d

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

[target.'cfg(target_arch = "wasm32")'.dependencies]
uuid = { version = "1.13.1", default-features = false, features = ["js"] }

[lints]
workspace = true

Expand Down
5 changes: 4 additions & 1 deletion crates/bevy_reflect/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -111,13 +111,16 @@ petgraph = { version = "0.6", features = ["serde-1"], optional = true }
smol_str = { version = "0.2.0", default-features = false, features = [
"serde",
], optional = true }
uuid = { version = "1.0", default-features = false, optional = true, features = [
uuid = { version = "1.13.1", default-features = false, optional = true, features = [
"v4",
"serde",
] }
variadics_please = "1.1"
wgpu-types = { version = "23", features = ["serde"], optional = true }

[target.'cfg(target_arch = "wasm32")'.dependencies]
uuid = { version = "1.13.1", default-features = false, features = ["js"] }

[dev-dependencies]
ron = "0.8.0"
rmp-serde = "1.1"
Expand Down
5 changes: 4 additions & 1 deletion crates/bevy_reflect/derive/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,10 @@ bevy_macro_utils = { path = "../../bevy_macro_utils", version = "0.16.0-dev" }
proc-macro2 = "1.0"
quote = "1.0"
syn = { version = "2.0", features = ["full"] }
uuid = { version = "1.1", features = ["v4"] }
uuid = { version = "1.13.1", features = ["v4"] }

[target.'cfg(target_arch = "wasm32")'.dependencies]
uuid = { version = "1.13.1", default-features = false, features = ["js"] }

[lints]
workspace = true
Expand Down
5 changes: 4 additions & 1 deletion crates/bevy_scene/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -35,10 +35,13 @@ bevy_platform_support = { path = "../bevy_platform_support", version = "0.16.0-d

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

[target.'cfg(target_arch = "wasm32")'.dependencies]
uuid = { version = "1.13.1", default-features = false, features = ["js"] }

[dev-dependencies]
postcard = { version = "1.0", features = ["alloc"] }
bincode = "1.3"
Expand Down

0 comments on commit 8cd8215

Please sign in to comment.