#postgres #tokio #postgresql #rustls #tokio-postgres

tokio-postgres-rustls

Rustls integration for tokio-postgres

12 releases (breaking)

0.10.0 Apr 14, 2023
0.9.0 Nov 16, 2021
0.8.0 Feb 10, 2021
0.6.0 Dec 2, 2020
0.2.0 Jul 12, 2019

#98 in Database interfaces

Download history 5520/week @ 2023-02-14 5812/week @ 2023-02-21 6530/week @ 2023-02-28 6795/week @ 2023-03-07 6955/week @ 2023-03-14 7510/week @ 2023-03-21 6935/week @ 2023-03-28 13936/week @ 2023-04-04 20935/week @ 2023-04-11 19241/week @ 2023-04-18 15123/week @ 2023-04-25 13510/week @ 2023-05-02 14015/week @ 2023-05-09 14369/week @ 2023-05-16 13655/week @ 2023-05-23 9694/week @ 2023-05-30

53,536 downloads per month
Used in 6 crates (5 directly)

MIT license

8KB
154 lines

tokio-postgres-rustls

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_safe_defaults()
    .with_root_certificates(rustls::RootCertStore::empty())
    .with_no_client_auth();
let tls = tokio_postgres_rustls::MakeRustlsConnect::new(config);
let connect_fut = tokio_postgres::connect("sslmode=require host=localhost user=postgres", tls);
// ...

License

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

Dependencies

~12–20MB
~443K SLoC