Gem 一覧へ戻る
jbg/tokio-postgres-rustls(新しいタブで開きます)
主要言語: Rust
Integration between rustls and tokio-postgres
- star 数
- 43
- watcher 数
- 2
- fork 数
- 39
- issue 数
- 3
- 最終更新
- 2026/05/21
主要言語: Rust
Integration between rustls and tokio-postgres
This is an integration between the rustls TLS stack and the tokio-postgres asynchronous PostgreSQL client library.
This crate has no default features. Enable the rustls crypto provider that your
application uses, either ring or aws-lc-rs. The optional webpki-roots and
native-certs features add convenience constructors for common root stores.
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);
// ...
tokio-postgres-rustls is distributed under the MIT license.