Skip to content

Commit fba3d7e

Browse files
committed
fix issues with latest getrandom and wasm target
Signed-off-by: Andrei Gherghescu <8067229+andrei-ng@users.noreply.github.com>
1 parent b9884f0 commit fba3d7e

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

.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"']

plotly/Cargo.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,15 +21,15 @@ plotly_ndarray = ["ndarray"]
2121
plotly_image = ["image"]
2222
plotly_embed_js = []
2323

24-
wasm = ["getrandom", "js-sys", "wasm-bindgen", "wasm-bindgen-futures"]
24+
wasm = ["getrandom/wasm_js", "js-sys", "wasm-bindgen", "wasm-bindgen-futures"]
2525
with-axum = ["rinja/with-axum", "rinja_axum"]
2626

2727
[dependencies]
2828
rinja = { version = "0.3", features = ["serde_json"] }
2929
rinja_axum = { version = "0.3", optional = true }
3030
dyn-clone = "1"
3131
erased-serde = "0.4"
32-
getrandom = { version = "0.2", features = ["js"], optional = true }
32+
getrandom = { version = "0.3", features = ["wasm_js"], optional = false }
3333
image = { version = "0.25", optional = true }
3434
js-sys = { version = "0.3", optional = true }
3535
plotly_derive = { version = "0.12", path = "../plotly_derive" }

0 commit comments

Comments
 (0)