feat(build): add cleanup-markdown feature flag (#1086)

This commit is contained in:
Marek Kuskowski
2022-09-28 10:00:25 -04:00
committed by GitHub
parent 56ff45d9a3
commit c1b08dffac
4 changed files with 64 additions and 52 deletions
+3 -2
View File
@@ -15,14 +15,15 @@ repository = "https://github.com/hyperium/tonic"
version = "0.8.0"
[dependencies]
prettyplease = {version = "0.1"}
prettyplease = { version = "0.1" }
proc-macro2 = "1.0"
prost-build = {version = "0.11", optional = true}
prost-build = { version = "0.11", optional = true }
quote = "1.0"
syn = "1.0"
[features]
default = ["transport", "prost"]
cleanup-markdown = ["prost-build/cleanup-markdown"]
prost = ["prost-build"]
transport = []
+8
View File
@@ -1,6 +1,14 @@
//! `tonic-build` compiles `proto` files via `prost` and generates service stubs
//! and proto definitiones for use with `tonic`.
//!
//! # Feature flags
//!
//! - `cleanup-markdown`: Enables cleaning up documentation from the generated code. Useful
//! when documentation of the generated code fails `cargo test --doc` for example.
//! - `prost`: Enables usage of prost generator (enabled by default).
//! - `transport`: Enables generation of `connect` method using `tonic::transport::Channel`
//! (enabled by default).
//!
//! # Required dependencies
//!
//! ```toml