#redis #async #database #pool


Just a Redis Pool implementation

6 releases

0.3.1 May 21, 2020
0.3.0 Mar 14, 2020
0.2.1 Feb 17, 2020
0.1.1 Feb 14, 2020

#73 in #redis

MIT license

251 lines


Rust 1.39 and tokio required !

Just an asynchronous Redis Pool implementation I did for personnal use, not sure if it is reliable and safe to use (There is no unsafe here, but the pool management is really basic).

This crate is (probably) NOT PRODUCTION READY, I have no experience, if you want to use it in personnal or professional projet, please check the code first.


This is a simple asynchronous Redis Pool, currently only supports a connection pool to a Single Redis instance, and will probably provide Cluster support later. If you want to understand how to use it, see examples and/or CiseauxSingle struct.

The library currently supports tokio only (Because of redis-rs, async-std support is coming), and require at least Rust 1.39

ciseaux_client = "0.3"


Create a connection pool default settings and the provided redis::Client (from redis-rs)

use redis::{Client, Cmd};
use ciseaux_client::CiseauxSingle;

async fn main() {
    let redis_client = Client::open("redis://").unwrap();
    let db_pool = CiseauxSingle::new(redis_client).await.expect("Failed to create Pool");
    // You can safely share CiseauxSingle between threads
    // since it use Arcs and Mutexes under the hood)
    let res = match db_pool.query::<_, Option<String>>(&redis::Cmd::get("hello")).await {
        Ok(v) => v,
        Err(e) => return,// Handle Error
    let hello = match res {
        Some(v) => v,
        None => return,// Handle Nil value
    println!("{}", hello);


~136K SLoC