#postgresql #tokio #tokio-postgresql

tokio-postgres-rustls

Rustls integration for tokio-postgres

16 releases (breaking)

0.13.0 Oct 19, 2024
0.12.0 Apr 2, 2024
0.11.1 Jan 18, 2024
0.10.0 Apr 14, 2023
0.2.0 Jul 12, 2019

#96 in Database interfaces

Download history 46391/week @ 2025-01-28 54191/week @ 2025-02-04 47411/week @ 2025-02-11 45743/week @ 2025-02-18 44342/week @ 2025-02-25 46704/week @ 2025-03-04 51718/week @ 2025-03-11 71722/week @ 2025-03-18 43787/week @ 2025-03-25 51045/week @ 2025-04-01 59438/week @ 2025-04-08 45551/week @ 2025-04-15 54650/week @ 2025-04-22 47493/week @ 2025-04-29 53468/week @ 2025-05-06 52438/week @ 2025-05-13

217,695 downloads per month
Used in 26 crates (14 directly)

MIT license

13KB
236 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_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

~16–26MB
~488K SLoC