🐙 tako
Reference

Cargo feature graph

Every cargo feature on the tako-rs umbrella crate — transports, runtimes, plugins, extractors, observability, and runtime selection.

The umbrella crate tako-rs is the public entry point. Sub-crate features are reached through it — for example, tako-rs/multipart turns on tako-rs-extractors/multipart and tako-rs-core/multipart together. You should never need to depend on tako-rs-core, tako-rs-extractors, tako-rs-server, tako-rs-server-pt, tako-rs-streams, or tako-rs-plugins directly.

To inspect the current shape locally:

cargo metadata --format-version 1 --no-deps \
  | jq '.packages[] | select(.name == "tako-rs") | .features'

Transports

FeatureDescriptionGates
(default)HTTP/1.1, raw TCP, Unix sockets, static files, core extractors and middleware. No optional flags are enabled.always on
wsWebSocket upgrades over HTTP/1.1 on either runtime; GraphQL subscriptions also require async-graphql and run on Tokio.tako-rs-core/ws
sseServer-Sent Events on either runtime.tako-rs-streams/sse
file-streamFileStream responder and range helpers; static file serving is available without this flag.tako-rs-streams/file-stream, tako-rs-core/file-stream
proxy-protocolTrusted PROXY v1/v2 listener on either runtime.tako-rs-server/proxy-protocol
udpRaw UDP datagrams on either runtime.tako-rs-server/udp
socket-activationInherit listener descriptors through ListenFds.tako-rs-server/socket-activation
tlsServer-side HTTPS via rustls.tako-rs-server/tls, tako-rs-core/tls
http2HTTP/2 cleartext (h2c) and ALPN-negotiated h2 over TLS.tako-rs-server/http2, tako-rs-core/http2
http3HTTP/3 over QUIC; also enables the QUIC dependency tree in tako-rs-streams.tako-rs-server/http3, tako-rs-streams/http3, tako-rs-core/http3
webtransportW3C WebTransport sessions on the HTTP/3 server, on either runtime, plus the Tokio-only raw QUIC helper. Implies http3.http3, tako-rs-server/webtransport, tako-rs-streams/webtransport, tako-rs-core/webtransport
vsockLinux vsock listener for sidecar workloads.tako-rs-server/vsock

Runtime selection

FeatureDescriptionGates
compioSwitch the server to the compio runtime (io_uring / IOCP / kqueue). Mutually exclusive with the tokio path at build time.tako-rs-core/compio, tako-rs-server/compio, tako-rs-streams/compio, tako-rs-plugins/compio, tako-rs-server-pt?/compio
compio-tlsTLS on compio. Implies compio.compio, tako-rs-server/compio-tls, tako-rs-core/compio-tls
per-threadThread-per-core HTTP/1; Tokio by default, Compio when compio is selected.dep:tako-rs-server-pt
per-thread-compioThread-per-core on Compio. Implies per-thread and compio throughout the workspace.per-thread, compio, tako-rs-server-pt/compio

See Runtime compatibility for the tokio vs compio trade-offs.

Plugins, middleware, signals

FeatureDescriptionGates
pluginsBundled middleware and plugins (CORS, compression, rate limiting, idempotency).tako-rs-core/plugins, tako-rs-plugins/plugins, tako-rs-server/plugins, tako-rs-server-pt?/plugins
signalsIn-process pub/sub bus, queue lifecycle signals, transport signals.tako-rs-core/signals, tako-rs-server/signals, tako-rs-plugins/signals, tako-rs-server-pt?/signals
ip-filterIpFilter middleware.tako-rs-plugins/ip-filter
hmac-signatureHmacSignature middleware.tako-rs-plugins/hmac-signature
json-schemaJsonSchema request-validation middleware.tako-rs-plugins/json-schema
zstdZstandard compression in plugins::compression. Implies plugins.tako-rs-plugins/zstd, tako-rs-core/zstd, plugins

Extractors

FeatureDescriptionGates
multipartMultipart / TakoTypedMultipart body extractors.tako-rs-extractors/multipart, tako-rs-core/multipart
protobufProtobuf<T> extractor via prost.tako-rs-extractors/protobuf, tako-rs-core/protobuf
simdUmbrella that enables both simd-sonic and simd-json-impl.simd-sonic, simd-json-impl
simd-sonicsonic-rs-backed JSON path.tako-rs-extractors/simd-sonic, tako-rs-core/simd-sonic
simd-json-implsimd-json-backed JSON path.tako-rs-extractors/simd-json-impl, tako-rs-core/simd-json-impl
typed-headerTypedHeader<H> extractor (via headers).tako-rs-extractors/typed-header
zero-copy-extractorsBorrowed variants of Json, Form, Query, HeaderMap.tako-rs-extractors/zero-copy-extractors, tako-rs-core/zero-copy-extractors
validatorValidated<T> adapter for the validator crate.tako-rs-extractors/validator
gardeValidated<T> adapter for the garde crate.tako-rs-extractors/garde
jwt-simpleJWT decode / verify backed by jwt-simple.tako-rs-plugins/jwt-simple, tako-rs-core/jwt-simple
ahashSwap the default request hasher for ahash across the workspace.tako-rs-core/ahash, tako-rs-extractors/ahash, tako-rs-plugins/ahash

Docs, GraphQL, gRPC, OpenAPI

FeatureDescriptionGates
async-graphqlGraphQL HTTP handlers; WebSocket subscriptions additionally need ws.tako-rs-core/async-graphql
graphiqlGraphiQL IDE endpoint.tako-rs-core/graphiql
grpcgRPC unary and streaming RPCs via prost.tako-rs-core/grpc
utoipaOpenAPI docs via utoipa.tako-rs-core/utoipa
utoipa-yamlYAML output for the utoipa integration. Implies utoipa.utoipa, tako-rs-core/utoipa-yaml
vesperaOpenAPI docs via vespera.tako-rs-core/vespera

Observability backends

FeatureDescriptionGates
tako-tracingtracing-subscriber integration helpers.tako-rs-core/tako-tracing, tako-rs-server/tako-tracing
metrics-prometheusPrometheus scrape endpoint + histogram. Implies plugins and signals.tako-rs-plugins/metrics-prometheus, tako-rs-core/metrics-prometheus, plugins, signals
metrics-opentelemetryOpenTelemetry OTLP metrics export. Implies plugins and signals.tako-rs-plugins/metrics-opentelemetry, tako-rs-core/metrics-opentelemetry, plugins, signals

Queue

queue-cron enables cron schedules and their chrono-based time calculations in tako-rs-core.

Allocator

FeatureDescriptionGates
jemallocRe-export tikv-jemallocator; the application installs its own global allocator.dep:tikv-jemallocator

Runtime and protocol combinations

--all-features compiles and selects Compio for the HTTP server, middleware, signals, queues, and per-thread workers. The Tokio-only raw QUIC helper is absent in that build. h2c is available through http2, WebTransport through webtransport, HTTP/3 through http3, PROXY protocol through proxy-protocol, Unix sockets on every unix target, and TLS with ALPN HTTP/2 through compio-tls plus http2.

Tako enables Hyper's HTTP/2 support only through http2 (other dependencies may also enable it). The workspace selects the Tokio runtime, I/O, timer, signal, filesystem, and synchronization features it uses instead of full.

The workspace MSRV is Rust 1.95. See the 2.1 migration guide for feature changes and explicit allocator configuration.

Removed features

client and native-certs were removed in 2.3.0, together with tako::client. Use reqwest or ureq for outbound HTTP.

Last updated on

On this page