Cargo Features

[dependencies]
redis = { version = "0.27.6", 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", "hashbrown", "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 of tokio, codec of tokio-util

Affects client::AsyncConnectionConfig, 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-native-certs, rustls-pemfile, rustls-pki-types

Enables ring and std of rustls

Only needed for rustls

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

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, backon, futures
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
uuid

Enables uuid

Optional uuid support

disable-client-setinfo
hashbrown

Enables hashbrown

Optional hashbrown support

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
futures cluster-async? connection-manager?
backon connection-manager?
r2d2 implicit feature

Enables r2d2

Only needed for the r2d2 feature

Affects sentinel::LockedSentinelClient

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?
rustls tls-rustls?
webpki-roots tls-rustls-webpki-roots?
rustls-native-certs tls-rustls?

Enables rustls-native-certs ^0.7

tokio-rustls tokio-rustls-comp?
futures-rustls async-std-rustls-comp?
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?