Cargo Features
[dependencies]
tonic = { version = "0.10.2", default-features = false, features = ["codegen", "gzip", "prost", "tls", "tls-roots", "tls-roots-common", "tls-webpki-roots", "transport", "channel"] }
- default = codegen, prost, transport
-
These default features are set whenever
tonic
is added without
somewhere in the dependency tree.default-features = false - codegen default
-
Enables async-trait
codegen
Affects
tonic::codegen
… - gzip
-
Enables flate2
compression
- prost default
- tls tls-roots-common? = transport
-
Enables rt and macros of tokio, tokio-rustls, rustls ^0.21.7 and rustls-pemfile ^1.0
Affects
conn::TlsConnectInfo
,tls::Identity
… - tls-roots = tls-roots-common
-
Enables rustls-native-certs ^0.6.3
- tls-roots-common tls-roots? tls-webpki-roots? = tls
- tls-webpki-roots = tls-roots-common
-
Enables webpki-roots ^0.25.0
- transport default tls? = channel
-
Enables axum ^0.6.9, net and time of tokio, tower, hyper ^0.14.26 and hyper-timeout ^0.4 and async-stream
async-stream:
rustls
and h2 ^0.3.17
h2:
transport
Affects
tonic::transport
… - channel transport
Features from optional dependencies
harness = false