diff --git a/Cargo.lock b/Cargo.lock index 1440af286..6d6d74e4b 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1254,6 +1254,7 @@ dependencies = [ "egui-wgpu", "fj-interop", "fj-math", + "getrandom", "raw-window-handle 0.4.3", "rfd", "thiserror", diff --git a/crates/fj-viewer/Cargo.toml b/crates/fj-viewer/Cargo.toml index 4aded387e..28747908f 100644 --- a/crates/fj-viewer/Cargo.toml +++ b/crates/fj-viewer/Cargo.toml @@ -31,3 +31,9 @@ features = ["xdg-portal"] [dependencies.wgpu] version = "0.13.1" features = ["webgl"] + +# We don't depend on `getrandom` directly, but we need this to enable the `js` +# feature when cross-compiling to WASM. Otherwise, `getrandom` will not build. +[target.'cfg(target_arch = "wasm32")'.dependencies.getrandom] +version = "0.2.8" +features = ["js"]