Cargo Features

[dependencies]
redis = { version = "0.28.1", default-features = false, features = ["acl", "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", "disable-client-setinfo", "tls", "async-std-tls-comp", "aio", "r2d2", "rust_decimal", "bigdecimal", "ahash", "uuid", "hashbrown"] }
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

geospatial default

Affects redis::geo

json

Enables serde_json and derive of serde

Only needed for RedisJSON Support

cluster cluster-async?

Enables crc16 and rand

crc16:

Only needed for cluster

Affects redis::cluster, redis::cluster_routing

script default

Enables sha1_smol

We need this for script support

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

Enables native-tls

Only needed for native tls

tls-rustls async-std-rustls-comp? tls-rustls-insecure? tls-rustls-webpki-roots? tokio-rustls-comp?

Enables rustls-native-certs ^0.7, rustls-pemfile, and rustls-pki-types and ring and std of rustls

Only needed for rustls

tls-rustls-insecure = tls-rustls
tls-rustls-webpki-roots = tls-rustls

Enables webpki-roots

async-std-comp async-std-native-tls-comp? async-std-rustls-comp? = aio

Enables async-std

Only needed for async_std support

Affects aio::async_std

async-std-native-tls-comp async-std-tls-comp? = async-std-comp, tls-native-tls

Enables async-native-tls

async-std-rustls-comp = async-std-comp, tls-rustls

Enables futures-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

Enables tokio-native-tls

tokio-rustls-comp = tls-rustls, tokio-comp

Enables tokio-rustls

connection-manager = aio

Enables backon and futures-channel

streams default

Affects redis::streams

cluster-async = aio, cluster

Enables futures-sink and log

futures-sink:

Only needed for cluster-async

Affects redis::cluster_async

keep-alive default

Enables socket2

sentinel

Enables rand

Affects redis::sentinel

tcp_nodelay num-bigint 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

aio async-std-comp? cluster-async? connection-manager? tokio-comp? = bytes

Instead of specifying "aio", use either "tokio-comp" or "async-std-comp".

Enables futures-util and pin-project-lite, tokio of combine, io-util of tokio, codec of tokio-util

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

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.

bytes aio?

Enables bytes

Only needed for AIO

r2d2 implicit feature

Enables r2d2

Only needed for the r2d2 feature

Affects sentinel::LockedSentinelClient

rust_decimal implicit feature

Enables rust_decimal

Only needed for bignum Support

bigdecimal implicit feature

Enables bigdecimal

bigdecimal:

Arbitrary precision decimal numbers

ahash implicit feature

Enables ahash

Optional aHash support

uuid implicit feature

Enables uuid

Optional uuid support

hashbrown implicit feature

Enables hashbrown

Optional hashbrown support