Skip to content

Commit 9fc6af0

Browse files
authored
fix: disable wasmbind in chrono for wasm32-unknown-unknown (#234)
1 parent ff71a52 commit 9fc6af0

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

crates/rmcp/Cargo.toml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@ rustdoc-args = ["--cfg", "docsrs"]
1717
serde = { version = "1.0", features = ["derive", "rc"] }
1818
serde_json = "1.0"
1919
thiserror = "2"
20-
chrono = { version = "0.4.38", features = ["serde"] }
2120
tokio = { version = "1", features = ["sync", "macros", "rt", "time"] }
2221
futures = "0.3"
2322
tracing = { version = "0.1" }
@@ -65,6 +64,12 @@ bytes = { version = "1", optional = true }
6564
# macro
6665
rmcp-macros = { version = "0.1", workspace = true, optional = true }
6766

67+
[target.'cfg(not(all(target_family = "wasm", target_os = "unknown")))'.dependencies]
68+
chrono = { version = "0.4.38", features = ["serde"] }
69+
70+
[target.'cfg(all(target_family = "wasm", target_os = "unknown"))'.dependencies]
71+
chrono = { version = "0.4.38", default-features = false, features = ["serde", "clock", "std", "oldtime"] }
72+
6873
[features]
6974
default = ["base64", "macros", "server"]
7075
client = []

0 commit comments

Comments
 (0)