djc / bb8

Full-featured async (tokio-based) postgres connection pool (like r2d2)
MIT License
753 stars 110 forks source link

Why bb8-redis can't support redis features? #146

Open Cheban1996 opened 1 year ago

Cheban1996 commented 1 year ago

I want use redis script but for bb8-redis features is disable default-features = false How i can enabled them?

djc commented 1 year ago

By depending on redis directly in your downstream crate and enabling the features there. If you want I'd welcome a PR that adds forwarding features to bb8-redis.

edmondwinston commented 10 months ago

@djc

I'm using bb8 and would like to fix this, but I can really use a hand.

  1. What does it mean by depending on redis directly on your downstream crate? Does it mean to have both bb8 and redis-rs? If so, could you please elaborate more on how to connect them? I tried but the error is too much for me.
  2. I understand the term forwarding features, but still have no idea how to implement after browsing round. Best I could find is having local patches, which is also what I have been doing, so could you please provide some links/guide?

Thank you!

djc commented 10 months ago
  1. Yes, you'd have dependencies for both. Have to make sure they're using the same version, though.
  2. I meant sending a PR that adds lines like "foo" = ["redis/foo"] to the bb8-redis Cargo.toml.