Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(transport): Add channel feature flag #960

Merged
merged 2 commits into from Apr 4, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
3 changes: 3 additions & 0 deletions tonic/Cargo.toml
Expand Up @@ -33,6 +33,9 @@ tls-roots-common = ["tls"]
tls-webpki-roots = ["tls-roots-common", "webpki-roots"]
transport = [
"axum",
"channel"
]
channel = [
"h2",
"hyper",
"tokio",
Expand Down
4 changes: 3 additions & 1 deletion tonic/src/lib.rs
Expand Up @@ -17,7 +17,9 @@
//! # Feature Flags
//!
//! - `transport`: Enables the fully featured, batteries included client and server
//! implementation based on [`hyper`], [`tower`] and [`tokio`]. Enabled by default.
//! implementation based on [`hyper`], [`tower`] and [`tokio`]. Enabled by default.
//! - `channel`: Enables just the full featured channel/client portion of the `transport`
//! feature.
//! - `codegen`: Enables all the required exports and optional dependencies required
//! for [`tonic-build`]. Enabled by default.
//! - `tls`: Enables the `rustls` based TLS options for the `transport` feature. Not
Expand Down
2 changes: 2 additions & 0 deletions tonic/src/transport/mod.rs
Expand Up @@ -94,6 +94,8 @@ mod service;
mod tls;

#[doc(inline)]
#[cfg(feature = "channel")]
#[cfg_attr(docsrs, doc(cfg(feature = "channel")))]
pub use self::channel::{Channel, Endpoint};
pub use self::error::Error;
#[doc(inline)]
Expand Down