From c5a111ddb2498f4552e625a0bc833eaf0a887004 Mon Sep 17 00:00:00 2001 From: Stephen Chung Date: Mon, 17 Oct 2022 11:54:25 +0800 Subject: [PATCH] Set getrandom/js with wasm-bindgen or stdweb --- Cargo.toml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index e1f3bd4e..d52f8b30 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -33,6 +33,7 @@ serde = { version = "1.0", default-features = false, features = ["derive", "allo serde_json = { version = "1.0", default-features = false, features = ["alloc"], optional = true } unicode-xid = { version = "0.2", default-features = false, optional = true } rust_decimal = { version = "1.16", default-features = false, features = ["maths"], optional = true } +getrandom = { version = "0.2", optional = true } rustyline = { version = "10", optional = true } [dev-dependencies] @@ -68,8 +69,8 @@ serde = ["dep:serde", "smartstring/serde", "smallvec/serde"] # implement serde f no_std = ["no-std-compat", "num-traits/libm", "core-error", "libm", "hashbrown", "no_time"] # compiling for WASM -wasm-bindgen = ["instant/wasm-bindgen"] -stdweb = ["instant/stdweb"] +wasm-bindgen = ["getrandom/js", "instant/wasm-bindgen"] +stdweb = ["getrandom/js", "instant/stdweb"] # compiling bin tools bin-features = ["decimal", "metadata", "serde", "debugging", "rustyline"]