A high-level Redis, Valkey, and RESP-compliant database client library for Rust with flexible type conversion.
redis-rs is a Rust client library for Redis, Valkey, and any RESP-compliant database server. It provides high-level, type-safe access to Redis functionality through a flexible API with customizable type conversion, making Redis operations in Rust both powerful and ergonomic.
Rust developers building applications that require interaction with Redis, Valkey, or other RESP-compliant databases, particularly those needing async support, connection pooling, or advanced features like cluster compatibility and JSON integration.
Developers choose redis-rs for its customizable type conversion via FromRedisValue and ToRedisArgs traits, comprehensive feature set including async support with tokio or smol, and flexibility that balances high-level ergonomics with low-level control for advanced use cases.
Redis library for rust
Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.
Implements FromRedisValue and ToRedisArgs traits, allowing Redis operations to return results in user-defined types, ensuring compile-time type checks and reducing runtime errors.
Offers optional async clients via tokio-comp or smol-comp features, with cheaply cloneable connections that are thread-safe, enabling efficient non-blocking I/O for high-concurrency applications.
Supports TLS with native-tls or rustls, Redis Cluster via cluster features, RedisJSON integration, and Azure Entra ID authentication, catering to enterprise and advanced use cases.
Provides sync connection pooling with r2d2 and async connections that are multiplexed and reusable, balancing performance and simplicity for different scaling needs.
Async support is not enabled for WebAssembly targets, and builds are untested against databases, making it unreliable for browser-based or WASM-focused projects.
Setting up TLS, especially with rustls, requires manual installation of crypto providers and specific feature flags, adding significant setup overhead compared to plug-and-play clients.
The library is split into numerous optional features (e.g., tokio-comp, smol-comp, various TLS backends), leading to dependency management complexity and a steeper learning curve.