Skip to content

Commit f1ca90f

Browse files
authoredApr 4, 2022
feat(transport): Add channel feature flag (#960)
1 parent 738ccba commit f1ca90f

File tree

3 files changed

+8
-1
lines changed

3 files changed

+8
-1
lines changed
 

‎tonic/Cargo.toml

+3
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,9 @@ tls-roots-common = ["tls"]
3333
tls-webpki-roots = ["tls-roots-common", "webpki-roots"]
3434
transport = [
3535
"axum",
36+
"channel"
37+
]
38+
channel = [
3639
"h2",
3740
"hyper",
3841
"tokio",

‎tonic/src/lib.rs

+3-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,9 @@
1717
//! # Feature Flags
1818
//!
1919
//! - `transport`: Enables the fully featured, batteries included client and server
20-
//! implementation based on [`hyper`], [`tower`] and [`tokio`]. Enabled by default.
20+
//! implementation based on [`hyper`], [`tower`] and [`tokio`]. Enabled by default.
21+
//! - `channel`: Enables just the full featured channel/client portion of the `transport`
22+
//! feature.
2123
//! - `codegen`: Enables all the required exports and optional dependencies required
2224
//! for [`tonic-build`]. Enabled by default.
2325
//! - `tls`: Enables the `rustls` based TLS options for the `transport` feature. Not

‎tonic/src/transport/mod.rs

+2
Original file line numberDiff line numberDiff line change
@@ -94,6 +94,8 @@ mod service;
9494
mod tls;
9595

9696
#[doc(inline)]
97+
#[cfg(feature = "channel")]
98+
#[cfg_attr(docsrs, doc(cfg(feature = "channel")))]
9799
pub use self::channel::{Channel, Endpoint};
98100
pub use self::error::Error;
99101
#[doc(inline)]

0 commit comments

Comments
 (0)
Please sign in to comment.