Skip to content

Commit e83158b

Browse files
author
Frederik Rothenberger
committed
Mark js-sys as optional for identity_core
In iotaledger#1397 my intention was to make the `js-sys` dependency mutually exclusive with the feature `custom_time`. As it turns out, it's not that simple and mixing target specific dependencies with feature specific dependencies does not actually work. See [here](https://doc.rust-lang.org/cargo/reference/specifying-dependencies.html#platform-specific-dependencies) and [here](https://doc.rust-lang.org/cargo/reference/features.html#mutually-exclusive-features). So this removes the broken feature reference in the dependency declaration and instead marks it as `optional`. Also, the feature `custom_time` takes precedence over `js-sys` so these do not actually conflict and one _could_ enable both.
1 parent 842f483 commit e83158b

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

identity_core/Cargo.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,8 @@ time = { version = "0.3.23", default-features = false, features = ["std", "serde
2121
url = { version = "2.4", default-features = false, features = ["serde"] }
2222
zeroize = { version = "1.6", default-features = false }
2323

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 }
24+
[target.'cfg(all(target_arch = "wasm32", not(target_os = "wasi")))'.dependencies]
25+
js-sys = { version = "0.3.55", default-features = false, optional = true }
2626

2727
[dev-dependencies]
2828
proptest = { version = "1.0.0" }

0 commit comments

Comments
 (0)