2 releases

0.13.0-rc.2 Oct 12, 2024
0.13.0-rc.1 Oct 11, 2024

#470 in Database interfaces

Download history 264/week @ 2024-10-08 30/week @ 2024-10-15

294 downloads per month

MIT license

14KB
239 lines

tokio-postgres-rustls2

This is a fork of tokio-postgres-rustls.

Unfortunately its development died down, so I decided to pick it up again to ensure it is updated in the future.

This is an integration between the rustls TLS stack and the tokio-postgres asynchronous PostgreSQL client library.

Crate

API Documentation

Example

let config = rustls::ClientConfig::builder()
    .with_root_certificates(rustls::RootCertStore::empty())
    .with_no_client_auth();
let tls = tokio_postgres_rustls2::MakeRustlsConnect::new(config);
let connect_fut = tokio_postgres::connect("sslmode=require host=localhost user=postgres", tls);
// ...

License

tokio-postgres-rustls2 is distributed under the MIT license.

Dependencies

~15–25MB
~482K SLoC