Cargo Features

redis = { version = "0.23.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", "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

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
tls-rustls-insecure = tls-rustls

Enables dangerous_configuration of rustls ^0.21.6

Only needed for 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 net of 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

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.

sha1_smol script

bytes aio?

With default (std)

futures-util aio? cluster-async?
pin-project-lite aio?
tokio-util aio?
tokio tokio-comp?

With rt, net and time

socket2 keep-alive

Enables socket2 ^0.4

arc-swap connection-manager?

futures cluster-async? connection-manager?

With default features

tokio-retry connection-manager?
r2d2 implicit feature

crc16 cluster?

rand cluster? sentinel?

With default features

async-std async-std-comp?

With default features

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

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

Enables default (runtime-async-std) of async-native-tls ^0.4

rustls tls-rustls?

Enables default features of rustls ^0.21.6

webpki-roots tls-rustls-webpki-roots?

Enables webpki-roots ^0.23.0

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

With default features

futures-rustls async-std-rustls-comp?
serde json?

With default (std)

serde_json json?

With default (std)

ahash implicit feature

Enables default (std) of ahash ^0.7.6

Optional aHash support

log cluster-async?