From 9851f5cb690636f7d088ae687de6530c49a9f6bb Mon Sep 17 00:00:00 2001 From: Mingwei Samuel Date: Fri, 6 Sep 2024 13:20:32 -0700 Subject: [PATCH] put tokio_tungstenite behind feature flag --- hydroflow/Cargo.toml | 3 ++- hydroflow/src/util/mod.rs | 3 +++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/hydroflow/Cargo.toml b/hydroflow/Cargo.toml index 58c11d27726f..8adb86457a13 100644 --- a/hydroflow/Cargo.toml +++ b/hydroflow/Cargo.toml @@ -20,6 +20,7 @@ hydroflow_datalog = [ "dep:hydroflow_datalog" ] deploy_integration = [ "dep:hydroflow_deploy_integration" ] python = [ "dep:pyo3" ] debugging = [ "hydroflow_lang/debugging" ] +tokio_tungstenite = [ "dep:tokio-tungstenite"] [[example]] name = "kvs_bench" @@ -59,7 +60,7 @@ serde_json = "1.0.115" slotmap = "1.0.0" smallvec = "1.6.1" tokio-stream = { version = "0.1.3", default-features = false, features = [ "time", "io-util", "sync" ] } -tokio-tungstenite = "0.23.1" +tokio-tungstenite = { version = "0.23.1", optional = true } tracing = "0.1.37" variadics = { path = "../variadics", version = "^0.0.6" } web-time = "1.0.0" diff --git a/hydroflow/src/util/mod.rs b/hydroflow/src/util/mod.rs index 2a637d88db62..0e894f80774d 100644 --- a/hydroflow/src/util/mod.rs +++ b/hydroflow/src/util/mod.rs @@ -29,7 +29,10 @@ pub use socket::*; #[cfg(feature = "deploy_integration")] pub mod deploy; + +#[cfg(feature = "tokio_tungstenite")] mod websocket; +#[cfg(feature = "tokio_tungstenite")] pub use websocket::*; use std::io::Read;