Skip to content

Commit

Permalink
feat: tower should be an optional dependency
Browse files Browse the repository at this point in the history
  • Loading branch information
sigoden committed Dec 16, 2023
1 parent 99409f5 commit 407b46e
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 7 deletions.
8 changes: 5 additions & 3 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,8 @@ pin-project-lite = "0.2.4"
socket2 = { version = "0.5", optional = true, features = ["all"] }
tracing = { version = "0.1", default-features = false, features = ["std"] }
tokio = { version = "1", optional = true, features = ["net", "rt", "time"] }
tower-service = "0.3"
tower = { version = "0.4.1", features = ["make", "util"] }
tower-service ={ version = "0.3", optional = true }
tower = { version = "0.4.1", optional = true, features = ["make", "util"] }

[dev-dependencies]
hyper = { version = "1.0.0", features = ["full"] }
Expand All @@ -49,16 +49,18 @@ full = [
"client-legacy",
"server",
"server-auto",
"service",
"http1",
"http2",
"tokio",
]

client = ["hyper/client"]
client = ["hyper/client", "dep:tower-service", "dep:tower"]
client-legacy = ["client"]

server = ["hyper/server"]
server-auto = ["server", "http1", "http2"]
service = ["dep:tower"]

http1 = ["hyper/http1"]
http2 = ["hyper/http2"]
Expand Down
5 changes: 1 addition & 4 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,7 @@ mod common;
pub mod rt;
#[cfg(feature = "server")]
pub mod server;
#[cfg(all(
any(feature = "http1", feature = "http2"),
any(feature = "server", feature = "client")
))]
#[cfg(feature = "service")]
pub mod service;

mod error;

0 comments on commit 407b46e

Please sign in to comment.