// the find
djc/bb8
Full-featured async (tokio-based) postgres connection pool (like r2d2)
bb8 is an async connection pool for Tokio, modeled on r2d2. It manages any connection type through the `ManageConnection` trait, so the same pool core works for Postgres, Redis, AMQP, gRPC, and a dozen other backends via community adapters. The target audience is Rust developers building async services who need pooled database or broker connections without writing their own lifecycle management.
The `ManageConnection` trait abstraction is the right design — one pool implementation, many backends, and the community adapter ecosystem is actually solid (Diesel async, Lapin, Tonic all covered). The r2d2 heritage means the API is battle-tested and familiar to anyone who's done sync Rust pooling. Actively maintained with recent commits and good CI coverage via codecov. The builder pattern for pool configuration is clean and expressive without being verbose.
Documentation is thin — the README example uses a fictional 'foodb' adapter, and real usage with bb8-postgres requires hunting through the examples directory rather than any prose explanation. No built-in metrics or observability hooks; if you want pool saturation stats or wait-time histograms you're implementing that yourself. The `get()` call returns a connection guard but there's no documented timeout API at the pool level beyond what you configure at build time — runtime adjustment isn't possible. Third-party adapters vary wildly in maintenance quality; several in the README list haven't had releases in years.