[package]
name = "tele"
description = "Ergonomic Telegram Bot API SDK for Rust, built on reqx"
version.workspace = true
edition.workspace = true
rust-version.workspace = true
license.workspace = true
repository.workspace = true
homepage.workspace = true
documentation = "https://docs.rs/tele"
readme = "README.md"
keywords = ["telegram", "bot", "api", "sdk", "reqx"]
categories = ["api-bindings", "network-programming", "asynchronous"]
include = [
    "src/**",
    "benches/**",
    "examples/**",
    "tests/**",
    "README.md",
]

[features]
default = ["async-tls-rustls-ring"]
_all-features-compat = ["reqx/_all-features-compat"]
_async = [
    "dep:bytes",
    "dep:futures-core",
    "dep:tokio",
    "reqx/_async",
]
_blocking = ["reqx/_blocking"]
async-tls-native = ["_async", "reqx/async-tls-native", "reqx/strict-feature-guards"]
async-tls-rustls-ring = ["_async", "reqx/async-tls-rustls-ring", "reqx/strict-feature-guards"]
async-tls-rustls-aws-lc-rs = ["_async", "reqx/async-tls-rustls-aws-lc-rs", "reqx/strict-feature-guards"]
blocking-tls-native = ["_blocking", "reqx/blocking-tls-native", "reqx/strict-feature-guards"]
blocking-tls-rustls-ring = ["_blocking", "reqx/blocking-tls-rustls-ring", "reqx/strict-feature-guards"]
blocking-tls-rustls-aws-lc-rs = ["_blocking", "reqx/blocking-tls-rustls-aws-lc-rs", "reqx/strict-feature-guards"]
bot = ["_async"]
axum = ["bot", "dep:axum"]
macros = ["bot", "dep:tele-macros"]
otel = ["reqx/otel"]
tracing = ["dep:tracing"]
redis-session = ["bot", "dep:redis"]
postgres-session = ["bot", "dep:sqlx"]

[dependencies]
axum = { workspace = true, optional = true }
bytes = { workspace = true, optional = true }
futures-core = { workspace = true, optional = true }
graviola = { workspace = true }
http = { workspace = true }
httpdate = { workspace = true }
reqx = { workspace = true }
redis = { workspace = true, optional = true }
serde = { workspace = true }
serde_json = { workspace = true }
sqlx = { workspace = true, optional = true }
tele-macros = { workspace = true, optional = true }
thiserror = { workspace = true }
tokio = { workspace = true, optional = true }
tracing = { workspace = true, optional = true }
url = { workspace = true }

[dev-dependencies]
criterion = { workspace = true }
tokio = { workspace = true }

[lints]
workspace = true

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

[[example]]
name = "async_send_message"
path = "examples/async_send_message.rs"
required-features = ["async-tls-rustls-ring"]

[[example]]
name = "blocking_send_message"
path = "examples/blocking_send_message.rs"
required-features = ["blocking-tls-rustls-ring"]

[[example]]
name = "bot_long_polling"
path = "examples/bot_long_polling.rs"
required-features = ["bot", "async-tls-rustls-ring"]

[[example]]
name = "bot_fallible_session"
path = "examples/bot_fallible_session.rs"
required-features = ["bot", "async-tls-rustls-ring"]

[[example]]
name = "bot_typed_commands"
path = "examples/bot_typed_commands.rs"
required-features = ["macros", "async-tls-rustls-ring"]

[[example]]
name = "bot_axum_webhook"
path = "examples/bot_axum_webhook.rs"
required-features = ["axum", "async-tls-rustls-ring"]

[[example]]
name = "api_layers"
path = "examples/api_layers.rs"
required-features = ["async-tls-rustls-ring"]

[[example]]
name = "bot_engine_long_polling"
path = "examples/bot_engine_long_polling.rs"
required-features = ["bot", "async-tls-rustls-ring"]

[[example]]
name = "bot_quickstart"
path = "examples/bot_quickstart.rs"
required-features = ["bot", "async-tls-rustls-ring"]

[[example]]
name = "bot_mini_app"
path = "examples/bot_mini_app.rs"
required-features = ["bot", "async-tls-rustls-ring"]

[[test]]
name = "async_client"
path = "tests/async_client.rs"
required-features = ["async-tls-rustls-ring"]

[[test]]
name = "blocking_client"
path = "tests/blocking_client.rs"
required-features = ["blocking-tls-rustls-ring"]

[[test]]
name = "bot_axum"
path = "tests/bot_axum.rs"
required-features = ["axum", "async-tls-rustls-ring"]

[[test]]
name = "bot_commands_derive"
path = "tests/bot_commands_derive.rs"
required-features = ["macros", "async-tls-rustls-ring"]

[[test]]
name = "bot_runtime"
path = "tests/bot_runtime.rs"
required-features = ["bot", "async-tls-rustls-ring"]

[[test]]
name = "error_classification"
path = "tests/error_classification.rs"

[[test]]
name = "method_coverage"
path = "tests/method_coverage.rs"

[[bench]]
name = "baseline"
harness = false
required-features = ["bot", "async-tls-rustls-ring"]
