From 73a3d3aebfa3115c45e11f0f2b54edf1c7a184e4 Mon Sep 17 00:00:00 2001 From: Sosthene Date: Wed, 13 Aug 2025 22:15:42 +0200 Subject: [PATCH] js feature of getrandom for wasm build --- Cargo.toml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/Cargo.toml b/Cargo.toml index fde7122..6632834 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -22,3 +22,9 @@ tsify = { git = "https://github.com/Sosthene00/tsify", branch = "next" } wasm-bindgen = "0.2.91" rs_merkle = "1.4.2" zstd = "0.13.3" + +[target.'cfg(target_arch = "wasm32")'.dependencies] +getrandom = { version = "0.2", features = ["js"] } + +[target.'cfg(not(target_arch = "wasm32"))'.dependencies] +getrandom = { version = "0.2" }