[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.16.0-rc.1" [dependencies] bitflags = { default-features = false, version = "2" } fastrand = { default-features = false, features = ["std"], version = "2" } futures-core = { default-features = false, features = ["std"], version = "0.3" } futures-sink = { default-features = false, features = ["std"], version = "0.3" } 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.19" } tokio-websockets = { default-features = false, features = ["client", "fastrand", "sha1_smol", "simd"], version = "0.5" } tracing = { default-features = false, features = ["std", "attributes"], version = "0.1" } twilight-gateway-queue = { default-features = false, path = "../twilight-gateway-queue", version = "0.16.0-rc.1" } twilight-model = { default-features = false, path = "../twilight-model", version = "0.16.0-rc.1" } # 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.16.0-rc.1" } simd-json = { default-features = false, features = ["serde_impl", "swar-number-parsing"], optional = true, version = ">=0.4, <0.14" } [dev-dependencies] anyhow = { default-features = false, features = ["std"], version = "1" } 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" } tokio-stream = { default-features = false, version = "0.1" } tracing-subscriber = { default-features = false, features = ["fmt", "tracing-log"], version = "0.3" } [features] default = ["rustls-native-roots", "twilight-http", "zlib-stock"] native-tls = ["tokio-websockets/native-tls", "tokio-websockets/openssl"] rustls-native-roots = ["tokio-websockets/ring", "tokio-websockets/rustls-native-roots"] rustls-webpki-roots = ["tokio-websockets/ring", "tokio-websockets/rustls-webpki-roots"] zlib-simd = ["dep:flate2", "flate2?/zlib-ng"] zlib-stock = ["dep:flate2", "flate2?/zlib"] [package.metadata.docs.rs] rustdoc-args = ["--cfg", "docsrs"]