Skip to content

Commit c5ebbc3

Browse files
committed
Configure chrono for wasm
1 parent b099956 commit c5ebbc3

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

Cargo.toml

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,6 @@ hex = "0.4.3"
2828
serde = "1.0.217"
2929
postcard = { version = "1.1.1", features = ["experimental-derive", "use-std"] }
3030
data-encoding = "2.8.0"
31-
chrono = {version = "0.4.39", default-features = false, features = ["js-sys", "wasmbind", "std"] }
3231
ref-cast = "1.0.24"
3332
arrayvec = "0.7.6"
3433
iroh = { version = "0.95", default-features = false }
@@ -43,6 +42,14 @@ reflink-copy = { version = "0.1.24", optional = true }
4342
n0-error = "0.1.2"
4443
nested_enum_utils = "0.2.3"
4544

45+
# non-wasm-in-browser dependencies
46+
[target.'cfg(not(all(target_family = "wasm", target_os = "unknown")))'.dependencies]
47+
chrono = { version = "0.4.39" }
48+
49+
# wasm-in-browser dependencies
50+
[target.'cfg(all(target_family = "wasm", target_os = "unknown"))'.dependencies]
51+
chrono = {version = "0.4.39", default-features = false, features = ["js-sys", "wasmbind", "std"] }
52+
4653
[dev-dependencies]
4754
clap = { version = "4.5.31", features = ["derive"] }
4855
hex = "0.4.3"

0 commit comments

Comments
 (0)