10 releases (breaking)

0.8.0 Apr 12, 2024
0.6.0 Jan 24, 2024
0.4.0 Apr 27, 2023
0.2.0 Nov 30, 2022
0.1.0 Jun 7, 2021

#1111 in HTTP server

Download history 342/week @ 2024-01-01 483/week @ 2024-01-08 394/week @ 2024-01-15 798/week @ 2024-01-22 626/week @ 2024-01-29 588/week @ 2024-02-05 593/week @ 2024-02-12 470/week @ 2024-02-19 397/week @ 2024-02-26 479/week @ 2024-03-04 581/week @ 2024-03-11 729/week @ 2024-03-18 540/week @ 2024-03-25 1130/week @ 2024-04-01 1217/week @ 2024-04-08 495/week @ 2024-04-15

3,384 downloads per month
Used in 6 crates

MIT/Apache

78KB
1.5K SLoC

Welcome to Trillium!

📖 Guide 📖

The guide provides an architectural overview and lay of the land connecting the trillium crates.

📑 Rustdocs 📑

The rustdocs represent the best way to learn about any of trillium's individual crates and the specific interfaces.




Legal:

Licensed under either of

at your option.

Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.


lib.rs:

This crate provides rustls trait implementations for trillium client (RustlsConnector) and server (RustlsAcceptor).

Cargo Features

This crate's default features should be appropriate for most users. To pare down on dependencies or customize trillium-rustls' usage of rustls, opt out of default features and reenable the appropriate features for your use case.

server and client features

This crate offers a server feature and a client feature. Opting out of default features allows you to avoid building any dependencies for the unused other component. By default, both server and client features are enabled.

Cryptographic backend selection

Rustls supports pluggable cryptographic backends as well as a process-default cryptographic cryptographic backend. There are two built-in feature-enabled cryptographic backends and other community provided cryptographic backends.

⚠️ There are three cryptographic backend cargo features, and they behave differently than the rustls features. Please read the following section.⚠️

trillium-rustls tries to avoid runtime panics where possible, so compiling this crate without a valid cryptographic backend will result in a compile time error. To opt into rustls's default process-default behavior, enable custom-crypto-provider as described below. Enabling multiple crypto providers will select exactly one of them at compile time in the following order:

aws-lc-rs

This is the default cryptographic backend in concordance with rustls' default. This backend will be selected if the feature is enabled. If either of the other two cryptographic backends are selected, trillium-rustls will log an error but use aws-lc-rs.

ring

If this feature is enabled, this backend will be selected even if custom-crypto-provider is also enabled.

custom-crypto-provider

In order to use a crypto provider other than the above two options, enable the custom-crypto-provider feature and either configure a trillium_rustls::rustls::ClientConfig or trillium_rustls::rustls::ServerConfig yourself to convert the equivalent trillium-rustls type, or install a custom process-default crypto provider with trillium_rustls::rustls::crypto::CryptoProvider::install_default prior to executing trillium-rustls code.

Client verifier

This crate offers a platform-verifier feature for client usage that builds a ClientConfig with the selected cryptographic backend and uses rustls-platform-verifier. This feature is enabled by default. If you disable the feature, webpki_roots will be used.

Dependencies

~15–39MB
~1M SLoC