From 9fc6af091d9b36a98e38f8584123328cd5640257 Mon Sep 17 00:00:00 2001 From: okoyfoeciov <92897177+okoyfoeciov@users.noreply.github.com> Date: Wed, 28 May 2025 23:10:36 +0700 Subject: [PATCH] fix: disable wasmbind in chrono for wasm32-unknown-unknown (#234) --- crates/rmcp/Cargo.toml | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/crates/rmcp/Cargo.toml b/crates/rmcp/Cargo.toml index 1cd3db4..5bc7e15 100644 --- a/crates/rmcp/Cargo.toml +++ b/crates/rmcp/Cargo.toml @@ -17,7 +17,6 @@ rustdoc-args = ["--cfg", "docsrs"] serde = { version = "1.0", features = ["derive", "rc"] } serde_json = "1.0" thiserror = "2" -chrono = { version = "0.4.38", features = ["serde"] } tokio = { version = "1", features = ["sync", "macros", "rt", "time"] } futures = "0.3" tracing = { version = "0.1" } @@ -65,6 +64,12 @@ bytes = { version = "1", optional = true } # macro rmcp-macros = { version = "0.1", workspace = true, optional = true } +[target.'cfg(not(all(target_family = "wasm", target_os = "unknown")))'.dependencies] +chrono = { version = "0.4.38", features = ["serde"] } + +[target.'cfg(all(target_family = "wasm", target_os = "unknown"))'.dependencies] +chrono = { version = "0.4.38", default-features = false, features = ["serde", "clock", "std", "oldtime"] } + [features] default = ["base64", "macros", "server"] client = []