Cargo Features

[dependencies]
redis = { version = "0.25.3", default-features = false, features = ["acl", "aio", "geospatial", "json", "cluster", "script", "tls-native-tls", "tls-rustls", "tls-rustls-insecure", "tls-rustls-webpki-roots", "async-std-comp", "async-std-native-tls-comp", "async-std-rustls-comp", "tokio-comp", "tokio-native-tls-comp", "tokio-rustls-comp", "connection-manager", "streams", "cluster-async", "keep-alive", "sentinel", "tcp_nodelay", "rust_decimal", "bigdecimal", "num-bigint", "uuid", "disable-client-setinfo", "tls", "async-std-tls-comp", "r2d2", "ahash"] }
default = acl, geospatial, keep-alive, script, streams

These default features are set whenever redis is added without default-features = false somewhere in the dependency tree.

acl default

Affects redis::acl

aio async-std-comp? connection-manager? tokio-comp? = async-trait, bytes, futures-util, pin-project-lite, tokio-util

Enables tokio of combine, alloc and sink of futures-util, io-util and sync of tokio, codec of tokio-util

Affects cmd::AsyncIter, redis::aio, types::RedisFuture

geospatial default

Affects redis::geo

json = serde, serde_json

Enables derive of serde

Only needed for RedisJSON Support

cluster cluster-async? = crc16, rand

Affects redis::cluster, redis::cluster_routing

script default = sha1_smol
tls-native-tls async-std-native-tls-comp? tls? tokio-native-tls-comp? = native-tls
tls-rustls async-std-rustls-comp? tls-rustls-insecure? tls-rustls-webpki-roots? tokio-rustls-comp? = rustls, rustls-native-certs, rustls-pemfile, rustls-pki-types
tls-rustls-insecure = tls-rustls
tls-rustls-webpki-roots = tls-rustls, webpki-roots
async-std-comp async-std-native-tls-comp? async-std-rustls-comp? = aio, async-std

Affects aio::async_std

async-std-native-tls-comp async-std-tls-comp? = async-native-tls, async-std-comp, tls-native-tls
async-std-rustls-comp = async-std-comp, futures-rustls, tls-rustls
tokio-comp tokio-native-tls-comp? tokio-rustls-comp? = aio, tokio

Enables tokio

Affects aio::tokio

tokio-native-tls-comp = tls-native-tls, tokio-comp, tokio-native-tls
tokio-rustls-comp = tls-rustls, tokio-comp, tokio-rustls
connection-manager = aio, arc-swap, futures, tokio-retry
streams default

Affects redis::streams

cluster-async = cluster, futures, futures-util, log

Affects redis::cluster_async

keep-alive default = socket2
sentinel = rand

Affects redis::sentinel

tcp_nodelay
rust_decimal

Enables rust_decimal

Only needed for bignum Support

bigdecimal

Enables bigdecimal

num-bigint

Enables num-bigint

uuid

Enables uuid

Optional uuid support

disable-client-setinfo
tls = tls-native-tls

Deprecated features
use "tls-native-tls" instead

async-std-tls-comp = async-std-native-tls-comp

use "async-std-native-tls-comp" instead

Features from optional dependencies

In crates that don't use the dep: syntax, optional dependencies automatically become Cargo features. These features may have been created by mistake, and this functionality may be removed in the future.

sha1_smol script

Enables sha1_smol

We need this for script support

bytes aio?

Enables bytes

Only needed for AIO

futures-util aio? cluster-async?
pin-project-lite aio?
tokio-util aio?
tokio aio? tokio-comp?
socket2 keep-alive
arc-swap connection-manager?

Enables arc-swap

Only needed for the connection manager

futures cluster-async? connection-manager?
tokio-retry connection-manager?
r2d2 implicit feature

Enables r2d2

Only needed for the r2d2 feature

crc16 cluster?

Enables crc16

Only needed for cluster

rand cluster? sentinel?
async-std async-std-comp?

Enables async-std

Only needed for async_std support

async-trait aio?
native-tls tls-native-tls?

Enables native-tls

Only needed for native tls

tokio-native-tls tokio-native-tls-comp?
async-native-tls async-std-native-tls-comp?

Enables async-native-tls ^0.4

rustls tls-rustls?

Enables rustls ^0.22

Only needed for rustls

webpki-roots tls-rustls-webpki-roots?
rustls-native-certs tls-rustls?
tokio-rustls tokio-rustls-comp?

Enables tokio-rustls ^0.25

futures-rustls async-std-rustls-comp?

Enables futures-rustls ^0.25

rustls-pemfile tls-rustls?
rustls-pki-types tls-rustls?
serde json?
serde_json json?
ahash implicit feature

Enables ahash

Optional aHash support

log cluster-async?