diff --git a/Cargo.toml b/Cargo.toml index bc973ea..9f72bdf 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -35,7 +35,7 @@ decimal = { path = "../decimal", version = "2" } #windows = { path = "../windows", version = "0.2" } money = { path = "../money", version = "0.3" } -pubsub = { path = "../pubsub" } +pubsub = { path = "../pubsub", optional = true } [features] default = ["inlines"] @@ -51,3 +51,4 @@ no-influx-buffer = [] disable-short-uuid = [] warnings = [] inlines = [] +latency = ["pubsub"] diff --git a/src/lib.rs b/src/lib.rs index 20d028e..7389b0c 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -26,7 +26,7 @@ extern crate num; extern crate dirs; #[cfg(feature = "zmq")] extern crate zmq; - +#[cfg(feature = "latency")] extern crate pubsub as pub_sub; use chrono::{DateTime, Utc, TimeZone as ChronoTZ}; @@ -43,6 +43,7 @@ use uuid::Uuid; pub mod influx; #[cfg(feature = "warnings")] pub mod warnings; +#[cfg(feature = "latency")] pub mod latency; pub mod hist;