Crate features / tonic
Feature flags · tonic 0.14.6 · from crates.io 2026-10-24
tonic features: what each one does, and the line to copy
Short answertonic 0.14.6 has 14 features. By default it turns on router, transport, codegen; add default-features = false to start from nothing. It needs Rust 1.88 or newer.
Pick features
Every feature
| Feature | In default | Turns on |
|---|---|---|
_tls-any | dep:tokio, tokio?/rt, tokio?/macros, tls-connect-info | |
channel | dep:hyper, hyper?/client, dep:hyper-util, hyper-util?/client-legacy, dep:tower, tower?/balance, tower?/buffer, tower?/discover, tower?/limit, tower?/load-shed, tower?/util, dep:tokio, tokio?/time, dep:hyper-timeout | |
codegen | yes | dep:async-trait |
deflate | dep:flate2 | |
gzip | dep:flate2 | |
router | yes | dep:axum, dep:tower, tower?/util |
server | dep:h2, dep:hyper, hyper?/server, dep:hyper-util, hyper-util?/service, hyper-util?/server-auto, dep:socket2, dep:tokio, tokio?/macros, tokio?/net, tokio?/time, tokio-stream/net, dep:tower, tower?/util, tower?/limit, tower?/load-shed | |
tls-aws-lc | _tls-any, tokio-rustls/aws-lc-rs | |
tls-connect-info | dep:tokio-rustls | |
tls-native-roots | _tls-any, channel, dep:rustls-native-certs | |
tls-ring | _tls-any, tokio-rustls/ring | |
tls-webpki-roots | _tls-any, channel, dep:webpki-roots | |
transport | yes | server, channel |
zstd | dep:zstd |
dep:x turns on the optional dependency x; x/y turns on feature y of dependency x (with ?, only if x is already on).
MSRV history
The minimum Rust version tonic declares (rust-version), and the release that changed it:
- 0.13.0 (2025-03-25): Rust 1.75
- 0.14.0 (2025-07-28): Rust 1.86
- 0.14.1 (2025-08-08): Rust 1.75
- 0.14.6 (2026-05-07): Rust 1.88
Stuck on an older compiler? Pin the last version that supports it, for example cargo update -p tonic --precise <version>, or use resolver 3, which picks compatible versions for you.
More on tonic
Real downloads, dependents and alternatives: tonic crate data (1.2M real downloads a day, 3,752 dependents).
Security record: tonic advisories.
docs.rs feature list · crates.io · license MIT · edition 2024
Up next
Before you depend on ittonic crate dataReal downloads, dependents, alternatives.Read it next →Did this answer your question?