twilight-gateway 0.15.0

Discord Gateway implementation for the Twilight ecosystem.
Documentation
[package]
authors.workspace = true
categories = ["api-bindings", "asynchronous", "web-programming::websocket"]
description = "Discord Gateway implementation for the Twilight ecosystem."
edition.workspace = true
homepage = "https://twilight.rs/chapter_1_crates/section_3_gateway.html"
include.workspace = true
keywords = ["discord", "discord-api", "twilight"]
license.workspace = true
name = "twilight-gateway"
publish = true
repository.workspace = true
rust-version.workspace = true
version = "0.15.0"

[dependencies]
bitflags = { default-features = false, version = "1" }
futures-util = { default-features = false, features = ["std"], version = "0.3" }
rand = { default-features = false, features = ["std", "std_rng"], version = "0.8" }
serde = { default-features = false, features = ["derive"], version = "1" }
serde_json = { default-features = false, features = ["std"], version = "1" }
tokio = { default-features = false, features = ["net", "rt", "sync", "time"], version = "1.8" }
tokio-tungstenite = { default-features = false, features = ["connect"], version = "0.18" }
tracing = { default-features = false, features = ["std", "attributes"], version = "0.1" }
twilight-gateway-queue = { default-features = false, path = "../twilight-gateway-queue", version = "0.15.0" }
twilight-model = { default-features = false, path = "../twilight-model", version = "0.15.0" }

# Optional
# The default backend for flate2; miniz-oxide, works differently
# from the C-backed backend zlib, When you give it the sync argument
# it does not seem to update the total_in of the function to have an offset
# https://github.com/alexcrichton/flate2-rs/issues/217
flate2 = { default-features = false, optional = true, version = "1.0.24" }
twilight-http = { default-features = false, optional = true, path = "../twilight-http", version = "0.15.0" }
simd-json = { default-features = false, features = ["serde_impl", "swar-number-parsing"], optional = true, version = ">=0.4, <0.8" }

# TLS libraries
# They are needed to track what is used in tokio-tungstenite
native-tls = { default-features = false, optional = true, version = "0.2.8" }
rustls-native-certs = { default-features = false, optional = true, version = "0.6" }
rustls-tls = { default-features = false, optional = true, package = "rustls", version = "0.20" }
webpki-roots = { default-features = false, optional = true, version = "0.22" }

[dev-dependencies]
anyhow = { default-features = false, features = ["std"], version = "1" }
futures = { default-features = false, version = "0.3" }
serde_test = { default-features = false, version = "1.0.136" }
static_assertions = { default-features = false, version = "1" }
tokio = { default-features = false, features = ["macros", "rt-multi-thread", "test-util"], version = "1.12" }
tracing-subscriber = { default-features = false, features = ["fmt", "tracing-log"], version = "0.3" }

[features]
default = ["rustls-native-roots", "twilight-http", "zlib-stock"]
native = ["dep:native-tls", "tokio-tungstenite/native-tls"]
rustls-native-roots = ["dep:rustls-tls", "dep:rustls-native-certs", "tokio-tungstenite/rustls-tls-native-roots"]
rustls-webpki-roots = ["dep:rustls-tls", "dep:webpki-roots", "tokio-tungstenite/rustls-tls-webpki-roots"]
zlib-simd = ["dep:flate2", "flate2?/zlib-ng"]
zlib-stock = ["dep:flate2", "flate2?/zlib"]

[package.metadata.docs.rs]
rustdoc-args = ["--cfg", "docsrs"]