Crates.io | tide-rustls |
lib.rs | tide-rustls |
version | 0.3.0 |
source | src |
created_at | 2020-07-27 03:06:16.510795 |
updated_at | 2021-03-21 04:48:24.879864 |
description | tide tls listener based on async-rustls and rustls |
homepage | |
repository | https://github.com/jbr/tide-rustls |
max_upload_size | |
id | 269958 |
size | 73,365 |
$ cargo add tide-rustls
#[async_std::main]
async fn main() -> tide::Result<()> {
let mut app = tide::new();
app.at("/").get(|_| async { Ok("Hello TLS") });
app.listen(
TlsListener::build()
.addrs("localhost:4433")
.cert(std::env::var("TIDE_CERT_PATH").unwrap())
.key(std::env::var("TIDE_KEY_PATH").unwrap()),
)
.await?;
Ok(())
}
This crate uses #![deny(unsafe_code)]
to ensure everything is implemented in
100% Safe Rust.