2 releases

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

#593 in Database interfaces

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