Skip to content

Commit

Permalink
health, reflection: make rustfmt dependency optional (#785)
Browse files Browse the repository at this point in the history
Co-authored-by: Lucio Franco <luciofranco14@gmail.com>
  • Loading branch information
Kaos1 and LucioFranco committed Oct 19, 2021
1 parent 09805ec commit c1fe31c
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 4 deletions.
7 changes: 4 additions & 3 deletions tonic-health/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,9 @@ categories = ["network-programming", "asynchronous"]
keywords = ["rpc", "grpc", "async", "healthcheck"]

[features]
default = ["transport"]
transport = ["tonic/transport"]
default = ["transport", "rustfmt"]
transport = ["tonic/transport", "tonic-build/transport"]
rustfmt = ["tonic-build/rustfmt"]

[dependencies]
tokio = { version = "1.0", features = ["sync"] }
Expand All @@ -30,4 +31,4 @@ async-stream = "0.3"
tokio = { version = "1.0", features = ["rt-multi-thread", "macros"]}

[build-dependencies]
tonic-build = { version = "0.6", path = "../tonic-build" }
tonic-build = { version = "0.6", path = "../tonic-build", features = ["prost"] }
6 changes: 5 additions & 1 deletion tonic-reflection/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,10 @@ readme = "README.md"
categories = ["network-programming", "asynchronous"]
keywords = ["rpc", "grpc", "async", "reflection"]

[features]
default = ["rustfmt"]
rustfmt = ["tonic-build/rustfmt"]

[dependencies]
bytes = "1.0"
prost = "0.9"
Expand All @@ -25,7 +29,7 @@ tokio-stream = { version = "0.1", features = ["net"] }
tonic = { version = "0.6", path = "../tonic", features = ["codegen", "prost"] }

[build-dependencies]
tonic-build = { version = "0.6", path = "../tonic-build" }
tonic-build = { version = "0.6", path = "../tonic-build", features = ["transport", "prost"] }

[dev-dependencies]
futures = "0.3"
Expand Down

0 comments on commit c1fe31c

Please sign in to comment.