Cargo Features
[dependencies]
tonic = { version = "0.14.2", default-features = false, features = ["codegen", "deflate", "zstd", "tls-ring", "tls-aws-lc", "tls-native-roots", "tls-webpki-roots", "tls-connect-info", "router", "server", "channel", "transport"] }
- default = codegen, router, transport
-
These default features are set whenever
tonic
is added without
somewhere in the dependency tree.default-features = false - codegen default
-
Enables async-trait
Affects
tonic::codegen
… - gzip deflate
-
Enables flate2
compression
- zstd
-
Enables zstd
- tls-ring = tls-connect-info
-
Enables macros and rt of tokio, ring of tokio-rustls
- tls-aws-lc = tls-connect-info
-
Enables macros and rt of tokio and aws-lc-rs of tokio-rustls
tokio-rustls:
Alias because Cargo features commonly use
-
- tls-native-roots = channel, tls-connect-info
-
Enables macros and rt of tokio and rustls-native-certs
rustls
- tls-webpki-roots = channel, tls-connect-info
-
Enables webpki-roots, macros and rt of tokio
- tls-connect-info tls-aws-lc? tls-native-roots? tls-ring? tls-webpki-roots?
-
Enables tokio-rustls
Affects
conn::TlsConnectInfo
… - router default
-
Affects
server::Router
… - server transport
-
Enables socket2, server of hyper, server-auto and service of hyper-util, macros, net and time of tokio, net of tokio-stream, limit, load-shed and util of tower and h2
transport
Affects
transport::server
,tonic::transport
… - channel tls-native-roots? tls-webpki-roots? transport
-
Enables hyper-timeout, client-legacy of hyper-util, time of tokio, balance, buffer, discover, limit, load-shed and util of tower and client of hyper
hyper:
Client/Server
Affects
transport::channel
,tonic::transport
… - transport default = channel, server
Features from optional dependencies
harness = false