sfackler / rust-postgres

Native PostgreSQL driver for the Rust programming language
Apache License 2.0
3.52k stars 446 forks source link

turmoil support #1149

Closed mcches closed 5 months ago

mcches commented 5 months ago

I'm one of the author's from turmoil and I was wondering how you'd feel about supporting a turmoil::net::TcpStream socket variant (under a feature flag of course). I was able to get this working with minimal changes to tokio-postgres thanks to how the Socket type is structured.

sfackler commented 5 months ago

I think things should work out of the box with connect_raw: https://docs.rs/tokio-postgres/latest/tokio_postgres/config/struct.Config.html#method.connect_raw

mcches commented 5 months ago

Ah, I missed that option. Looks like exactly what I need. Thanks!