From 1c751d44045ea79adc6c9e54caace8ea2635fa17 Mon Sep 17 00:00:00 2001 From: Bhargav Date: Mon, 30 Sep 2019 16:03:07 -0700 Subject: [PATCH] add note on required dependencies (#15) * add note on required dependencies * Include build dependencies in codegen --- tonic-examples/README.md | 1 + tonic/Cargo.toml | 7 ++++--- tonic/src/codegen.rs | 4 ++++ 3 files changed, 9 insertions(+), 3 deletions(-) diff --git a/tonic-examples/README.md b/tonic-examples/README.md index 490d2ca..22583af 100644 --- a/tonic-examples/README.md +++ b/tonic-examples/README.md @@ -70,3 +70,4 @@ $ cargo run --bin tls-client ```bash $ cargo run --bin tls-server + diff --git a/tonic/Cargo.toml b/tonic/Cargo.toml index 56bbb6e..d8e29d8 100644 --- a/tonic/Cargo.toml +++ b/tonic/Cargo.toml @@ -23,8 +23,8 @@ categories = ["web-programming", "network-programming", "asynchronous"] keywords = ["rpc", "grpc", "async", "futures", "protobuf"] [features] -default = ["transport", "codegen", "prost"] -codegen = ["async-trait"] +default = ["transport", "codegen"] +codegen = ["async-trait", "prost", "prost-derive", "bytes"] transport = [ "hyper", "tokio", @@ -43,7 +43,6 @@ futures-util-preview = "=0.3.0-alpha.18" tracing = "0.1" http = "0.1.14" base64 = "0.10" -bytes = "0.4.7" percent-encoding = "1.0.1" tower-service = "=0.3.0-alpha.1" @@ -54,9 +53,11 @@ pin-project = "=0.4.0-alpha.11" # prost prost = { version = "0.5", optional = true } +prost-derive = { version = "0.5", optional = true } # codegen async-trait = { version = "0.1.13", optional = true } +bytes = {version = "0.4", optional = true} # transport hyper = { git = "https://github.com/hyperium/hyper", features = ["unstable-stream"], optional = true, rev = "2b0405c48c10bca7893c30ea960ac20a41a8578f" } diff --git a/tonic/src/codegen.rs b/tonic/src/codegen.rs index e5eea9b..7f7b416 100644 --- a/tonic/src/codegen.rs +++ b/tonic/src/codegen.rs @@ -34,3 +34,7 @@ impl std::fmt::Display for Never { } impl std::error::Error for Never {} + +pub use prost::*; +pub use prost_derive::*; +pub use bytes::*;