sfackler / rust-postgres

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

turmoil support #1149

Closed mcches closed 4 weeks ago

mcches commented 4 weeks 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 4 weeks 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 4 weeks ago

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