An asynchronous Redis client for Rust.
Documentation
Philosophy
- Low allocations
- Full async library
- Lock free implementation
- Rust idiomatic API
- Multiplexing as a core feature
Features
- Full documentation with multiple examples
- Support all Redis Commands until Redis 8.0
- Async support (tokio or async-std)
- Different client modes:
- Single client
- Multiplexed client
- Pooled client manager (based on bb8)
- Automatic command batching
- Advanced reconnection & retry strategy
- Pipelining support
- Configuration with Redis URL or dedicated builder
- TLS support
- Transaction support
- Pub/sub support
- Sentinel support
- LUA Scripts/Functions support
- Cluster support (minimus supported Redis version is 6)
- Client-side caching support
- RedisGraph v2.10 support
Basic Usage
use ;
async
Tests
- From the
redis
directory, rundocker_up.sh
ordocker_up.cmd
- run
cargo test --features pool,tokio-rustls,json,client-cache
(Tokio runtime) - run
cargo test --no-default-features --features async-std-runtime,async-std-native-tls,json,client-cache
(async-std runtime) - run
cargo fmt --all -- --check
Benchmarks
- From the
redis
directory, rundocker_up.sh
ordocker_up.cmd
- run
cargo bench