-
-
Notifications
You must be signed in to change notification settings - Fork 3.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
getrandom v0.2.15 blocks uuid and compiling to wasm #17699
Comments
As a workaround, can you try adding the following to you [target.'cfg(target_arch = "wasm32")'.dependencies]
uuid = { version = "1.13.1", default-features = false, features = ["js"] } This enables the |
We also just started getting this today - Screwing up our entire pipeline atm.
Note for anyone who comes across this, this may not be enough. You may also need to add this to a [target.'cfg(target_family = "wasm")']
rustflags = ['--cfg=getrandom_backend="wasm_js"'] |
Our pipeline in #90 is unable to merge due to bevyengine/bevy#17699 This PR fixes the issue with a workaround. Stage the Cargo.lock, and fix the transitive dependency on getrandom. Dually Closes #91 and unblocks #90
Thank you the fix works. To summarize, my Cargo.toml looks as follows
and .cargo/config.toml
|
this should be fixed with the update to Bevy 0.15.2 |
We no longer need to pin getrandom's backend due to a transitive dependency in uuid. This was fixed today by bevyengine/bevy#17699 (comment)
What problem does this solve or what need does it fill?
Hey! I'm trying to build my bevy game for wasm32-unknown-unknown. When compiling for wasm I receive
uuid
couldn't build errors withcould not find RngImp in imp
inuuid-1.13.1/src/rng.rs:10:10
. Cargo.lock has dependencies on getrandom 0.2.15 and 0.3.1. I had manually setgetrandom = { version = "0.3", features = ["wasm_js"] }
after following up on previous errors. I also setrustflags = ["--cfg", "getrandom_backend=\"wasm_js\""]
in.cargo/config.toml
.Specifying the feature = ["wasm_js"] also requires specifying a version, setting version to "*" doesn't solve the issue either.
Following the dependency tree, the origin of these problems seems to be from bevy_utils on ahash on const-random on const-random-macro on getrandom.
Maybe I'm on the completely wrong trail as desktop
cargo run
builds fine.What solution would you like?
It seems that ahash and const-random-macro are updated only sporadically. Forking the packages to improve control over dependencies could be a solution.
What alternative(s) have you considered?
Other, more actively maintained dependencies could replace the packages in question.
Other
The text was updated successfully, but these errors were encountered: