Registry / networking / async-rustls

async-rustls

JSON →
library0.4.2rscratesunverified

Asynchronous TLS/SSL streams using Rustls, compatible with async runtimes.

# Cargo.toml [dependencies] async-rustls = "0.4.2"
INSTALL
IMPORT
SIG · ASYNC-RUSTLS
A
async-rustls
networkingrustv0.4.2
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

TlsAcceptor
use async_rustls::TlsAcceptor;

Creates a TLS acceptor from a Rustls server configuration.

use async_rustls::TlsAcceptor; use std::sync::Arc; fn main() { let certs = vec![]; // load certificates let key = vec![]; // load private key let acceptor = TlsAcceptor::from(Arc::new(rustls::ServerConfig::builder() .with_safe_defaults() .with_no_client_auth() .with_single_cert(certs, key) .unwrap())); }
Debug
Known issues
gotchaRequires an async runtime like tokio or async-std to function.
fix
Ensure you have a runtime set up (e.g., #[tokio::main]).
affects: >=0.4.0
Upgrade
Version history
0.4.2latest on crates.io
Audit
Dependencies

No dependency data recorded yet.

Agent activity
50 hits · last 30 days
node
42
OpenAI (training)
1
Resources
async-rustls — cargo add async-rustls · libregistry