Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 15 additions & 8 deletions book/src/chapter_1_crates/section_3_gateway.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ checks.

## Features


`twilight-gateway` includes a number of features for things ranging from
payload deserialization to TLS features.

Expand Down Expand Up @@ -44,22 +43,30 @@ This is disabled by default.

### TLS

`twilight-gateway` has features to enable [`async-tungstenite`] and
[`twilight-http`]'s TLS features. These features are mutually exclusive. `rustls`
is enabled by default.
`twilight-gateway` has features to enable [`tokio-tungstenite`]'s TLS features.
These features are mutually exclusive. `rustls-native-roots` is enabled by
default.

#### Native

The `native` feature enables [`async-tungstenite`]'s `tokio-native-tls` feature
as well as [`twilight-http`]'s `native` feature which uses `hyper-tls`.
The `native` feature enables [`tokio-tungstenite`]'s `native-tls` feature.

#### RusTLS

The `rustls` feature enables [`async-tungstenite`]'s `tokio-rustls` feature and
[`twilight-http`]'s `rustls` feature, which use [RusTLS] as the TLS backend.
RusTLS allows specifying from where certificate roots are retrieved from.

##### Native roots

The `rustls-native-roots` feature enables [`tokio-tungstenite`]'s
`rustls-tls-native-roots` feature.

This is enabled by default.

##### Web PKI roots

The `rustls-webpki-roots` feature enables [`tokio-tungstenite`]'s
`rustls-tls-webpki-roots` feature.

### Zlib

#### Stock
Expand Down