fix: add getrandom with js feature for wasm (#2076)
This commit is contained in:
parent
8ed95f1363
commit
ff05a8762b
|
@ -1409,6 +1409,7 @@ dependencies = [
|
|||
"elliptic-curve",
|
||||
"ethabi",
|
||||
"generic-array 0.14.6",
|
||||
"getrandom 0.2.8",
|
||||
"hex",
|
||||
"hex-literal",
|
||||
"k256",
|
||||
|
|
|
@ -47,6 +47,10 @@ num_enum = "0.5.9"
|
|||
[target.'cfg(not(target_arch = "wasm32"))'.dependencies]
|
||||
tempfile = { version = "3.3.0", default-features = false }
|
||||
|
||||
[target.'cfg(target_arch = "wasm32")'.dependencies]
|
||||
# NOTE: this enables wasm compatibility for getrandom indirectly
|
||||
getrandom = { version = "0.2", features = ["js"] }
|
||||
|
||||
[dev-dependencies]
|
||||
serde_json = { version = "1.0.64", default-features = false }
|
||||
bincode = { version = "1.3.3", default-features = false }
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
#![cfg_attr(docsrs, feature(doc_cfg))]
|
||||
#![doc = include_str!("../README.md")]
|
||||
#![deny(rustdoc::broken_intra_doc_links)]
|
||||
#![deny(unused_crate_dependencies)]
|
||||
#![cfg_attr(not(target_arch = "wasm32"), deny(unused_crate_dependencies))]
|
||||
|
||||
pub mod types;
|
||||
|
||||
|
|
Loading…
Reference in New Issue