Skip to content

Commit 989e6ca

Browse files
author
Frederik Rothenberger
committed
Allow compilation for target wasm32-unknown-unknown without js-sys
Also removes the unused dependency on `iota-crypto` (which also had a dependency on `js-sys` through the `random` feature).
1 parent 2fda099 commit 989e6ca

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

identity_core/Cargo.toml

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@ rust-version.workspace = true
1212
description = "The core traits and types for the identity-rs library."
1313

1414
[dependencies]
15-
iota-crypto = { version = "0.23", default-features = false, features = ["ed25519", "random", "sha", "x25519", "std"] }
1615
multibase = { version = "0.9", default-features = false, features = ["std"] }
1716
serde = { workspace = true, features = ["std"] }
1817
serde_json = { workspace = true, features = ["std"] }
@@ -22,8 +21,8 @@ time = { version = "0.3.23", default-features = false, features = ["std", "serde
2221
url = { version = "2.4", default-features = false, features = ["serde"] }
2322
zeroize = { version = "1.6", default-features = false }
2423

25-
[target.'cfg(all(target_arch = "wasm32", not(target_os = "wasi")))'.dependencies]
26-
js-sys = { version = "0.3.55", default-features = false }
24+
[target.'cfg(all(target_arch = "wasm32", not(target_os = "wasi"), not(feature = "custom_time")))'.dependencies]
25+
js-sys = { version = "0.3.55", default-features = false, optional = true }
2726

2827
[dev-dependencies]
2928
proptest = { version = "1.0.0" }

0 commit comments

Comments
 (0)