https://github.com/aumetra/tokio-postgres-rustls2
Integration between rustls and tokio-postgres (Fork of https://github.com/jbg/tokio-postgres-rustls)
https://github.com/aumetra/tokio-postgres-rustls2
postgres postgresql rust
Last synced: 3 months ago
JSON representation
Integration between rustls and tokio-postgres (Fork of https://github.com/jbg/tokio-postgres-rustls)
- Host: GitHub
- URL: https://github.com/aumetra/tokio-postgres-rustls2
- Owner: aumetra
- License: mit
- Created: 2024-10-12T00:27:13.000Z (almost 2 years ago)
- Default Branch: main
- Last Pushed: 2024-10-12T00:29:56.000Z (almost 2 years ago)
- Last Synced: 2025-04-12T11:25:31.046Z (over 1 year ago)
- Topics: postgres, postgresql, rust
- Language: Rust
- Homepage:
- Size: 40 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# tokio-postgres-rustls2
> This is a fork of [`tokio-postgres-rustls`](https://github.com/jbg/tokio-postgres-rustls.git).
>
> 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](https://github.com/ctz/rustls)
and the [tokio-postgres asynchronous PostgreSQL client library](https://github.com/sfackler/rust-postgres).
[](https://crates.io/crates/tokio-postgres-rustls2)
[API Documentation](https://docs.rs/tokio-postgres-rustls2/)
# 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.