2020-08-12 17:04:50 +02:00
|
|
|
[package]
|
|
|
|
name = "teloxide-core"
|
2024-08-17 13:38:01 +02:00
|
|
|
version = "0.10.1"
|
2022-11-17 22:15:48 +01:00
|
|
|
description = "Core part of the `teloxide` library - telegram bot API client"
|
|
|
|
|
|
|
|
rust-version.workspace = true
|
|
|
|
edition.workspace = true
|
|
|
|
license.workspace = true
|
|
|
|
homepage.workspace = true
|
|
|
|
repository.workspace = true
|
2020-08-12 17:04:50 +02:00
|
|
|
|
2021-02-16 22:06:37 +01:00
|
|
|
documentation = "https://docs.rs/teloxide-core/"
|
|
|
|
readme = "README.md"
|
|
|
|
|
2023-01-17 19:35:47 +01:00
|
|
|
keywords = ["teloxide", "telegram", "telegram-bot", "telegram-bot-api", "bot"]
|
2021-02-16 22:17:14 +01:00
|
|
|
categories = ["api-bindings", "asynchronous"]
|
2021-02-16 22:06:37 +01:00
|
|
|
|
|
|
|
|
2022-11-17 22:15:48 +01:00
|
|
|
[features]
|
2023-02-03 14:12:57 +01:00
|
|
|
# NB: When adding features here, don't forget to update teloxide's Cargo.toml
|
|
|
|
|
2022-11-17 22:15:48 +01:00
|
|
|
default = ["native-tls"]
|
|
|
|
|
|
|
|
rustls = ["reqwest/rustls-tls"]
|
2024-07-09 23:29:39 +02:00
|
|
|
rustls-native-roots = ["reqwest/rustls-tls-native-roots"]
|
2022-11-17 22:15:48 +01:00
|
|
|
native-tls = ["reqwest/native-tls"]
|
|
|
|
|
|
|
|
# Features which require nightly compiler.
|
|
|
|
#
|
|
|
|
# Currently the only used compiler feature is feature(type_alias_impl_trait)
|
|
|
|
# which allow implementing `Future`s without boxing.
|
|
|
|
nightly = []
|
|
|
|
|
|
|
|
# Throttling bot adaptor
|
2023-10-04 17:37:18 +02:00
|
|
|
throttle = ["vecrem"]
|
2022-11-17 22:15:48 +01:00
|
|
|
|
|
|
|
# Trace bot adaptor
|
|
|
|
trace_adaptor = []
|
|
|
|
|
|
|
|
# Erased bot adaptor
|
|
|
|
erased = []
|
|
|
|
|
|
|
|
# CacheMe bot adaptor
|
|
|
|
cache_me = []
|
|
|
|
|
|
|
|
# All features except nightly and tls-related
|
2024-02-13 20:22:17 +01:00
|
|
|
full = ["throttle", "trace_adaptor", "erased", "cache_me"]
|
2022-11-17 22:15:48 +01:00
|
|
|
|
2020-08-12 17:04:50 +02:00
|
|
|
|
|
|
|
[dependencies]
|
2020-08-12 18:39:40 +02:00
|
|
|
futures = "0.3.5"
|
2024-08-24 15:15:00 +02:00
|
|
|
tokio = { version = "1.39", features = ["fs", "io-util"] }
|
2022-07-19 11:51:51 +02:00
|
|
|
tokio-util = { version = "0.7.0", features = ["codec"] }
|
2022-09-23 16:14:58 +02:00
|
|
|
pin-project = "1.0.12"
|
2021-01-07 13:58:51 +01:00
|
|
|
bytes = "1.0.0"
|
2024-08-24 14:54:49 +02:00
|
|
|
reqwest = { version = "0.12.7", features = [
|
2023-10-04 17:42:18 +02:00
|
|
|
"json",
|
|
|
|
"stream",
|
|
|
|
"multipart",
|
|
|
|
], default-features = false }
|
2021-05-04 14:55:03 +02:00
|
|
|
url = { version = "2", features = ["serde"] }
|
2021-03-13 12:46:16 +01:00
|
|
|
log = "0.4"
|
2020-08-12 18:39:40 +02:00
|
|
|
|
|
|
|
serde = { version = "1.0.114", features = ["derive"] }
|
|
|
|
serde_json = "1.0.55"
|
2024-07-17 15:49:44 +02:00
|
|
|
serde_with = "1.5.2"
|
2023-10-04 17:42:18 +02:00
|
|
|
uuid = { version = "1.1.0", features = ["v4"] } # for attaching input files
|
|
|
|
|
2020-08-12 18:39:40 +02:00
|
|
|
derive_more = "0.99.9"
|
|
|
|
mime = "0.3.16"
|
|
|
|
thiserror = "1.0.20"
|
2021-01-07 13:58:51 +01:00
|
|
|
once_cell = "1.5.0"
|
2022-01-13 14:46:37 +01:00
|
|
|
takecell = "0.1"
|
2022-01-13 13:11:50 +01:00
|
|
|
take_mut = "0.2"
|
2022-01-13 14:46:37 +01:00
|
|
|
rc-box = "1.1.1"
|
2024-07-09 23:32:12 +02:00
|
|
|
chrono = { version = "0.4.32", default-features = false }
|
2021-07-08 12:04:40 +02:00
|
|
|
either = "1.6.1"
|
2021-12-29 18:36:08 +01:00
|
|
|
bitflags = { version = "1.2" }
|
2020-08-12 17:04:50 +02:00
|
|
|
|
2021-01-12 11:13:53 +01:00
|
|
|
vecrem = { version = "0.1", optional = true }
|
2020-09-30 18:30:04 +02:00
|
|
|
|
2022-11-17 22:15:48 +01:00
|
|
|
|
2021-07-12 15:58:51 +02:00
|
|
|
[dev-dependencies]
|
2024-08-18 15:54:37 +02:00
|
|
|
pretty_env_logger = "0.5"
|
2023-10-04 17:42:18 +02:00
|
|
|
tokio = { version = "1.8.0", features = [
|
|
|
|
"fs",
|
|
|
|
"macros",
|
|
|
|
"macros",
|
|
|
|
"rt-multi-thread",
|
|
|
|
] }
|
2022-05-24 11:50:33 +02:00
|
|
|
cool_asserts = "2.0.3"
|
2021-07-12 15:58:51 +02:00
|
|
|
|
2022-08-09 19:07:18 +02:00
|
|
|
xshell = "0.2"
|
2024-08-24 14:54:49 +02:00
|
|
|
ron = "0.8.1"
|
2022-08-09 19:07:18 +02:00
|
|
|
indexmap = { version = "1.9", features = ["serde-1"] }
|
|
|
|
aho-corasick = "0.7"
|
|
|
|
itertools = "0.10"
|
2024-08-16 12:59:55 +02:00
|
|
|
pretty_assertions = "1.4.0"
|
2022-08-09 19:07:18 +02:00
|
|
|
|
2020-10-20 14:33:22 +02:00
|
|
|
|
2021-05-08 23:43:16 +02:00
|
|
|
[package.metadata.docs.rs]
|
2022-01-31 16:16:44 +01:00
|
|
|
features = ["full", "nightly", "tokio/macros", "tokio/rt-multi-thread"]
|
2021-01-07 12:58:48 +01:00
|
|
|
rustdoc-args = ["--cfg", "docsrs", "-Znormalize-docs"]
|
2021-01-13 14:12:04 +01:00
|
|
|
|
2022-01-31 16:16:44 +01:00
|
|
|
# https://github.com/rust-lang/rust/issues/88791
|
2022-12-28 20:16:23 +01:00
|
|
|
cargo-args = ["-Zunstable-options", "-Zrustdoc-scrape-examples"]
|
2022-01-31 16:16:44 +01:00
|
|
|
|
2023-02-28 17:45:39 +01:00
|
|
|
[package.metadata.release]
|
|
|
|
tag-prefix = "core-"
|
|
|
|
enable-features = ["full"]
|
|
|
|
pre-release-replacements = [
|
2023-10-04 17:42:18 +02:00
|
|
|
{ file = "README.md", search = "teloxide-core = \"[^\"]+\"", replace = "teloxide-core = \"{{version}}\"" },
|
|
|
|
{ file = "src/lib.rs", search = "teloxide-core = \"[^\"]+\"", replace = "teloxide-core = \"{{version}}\"" },
|
|
|
|
{ file = "CHANGELOG.md", search = "## unreleased", replace = "## unreleased\n\n## {{version}} - {{date}}", exactly = 1 },
|
2023-02-28 17:45:39 +01:00
|
|
|
]
|
2022-11-17 22:15:48 +01:00
|
|
|
|
2024-06-25 17:19:38 +02:00
|
|
|
[lints.rust]
|
|
|
|
unexpected_cfgs = { level = "warn", check-cfg = ['cfg(dep_docsrs)'] }
|
|
|
|
|
2021-01-13 14:12:04 +01:00
|
|
|
[[example]]
|
|
|
|
name = "self_info"
|
2022-09-23 15:48:26 +02:00
|
|
|
required-features = ["tokio/macros", "tokio/rt-multi-thread"]
|
2021-07-12 15:58:51 +02:00
|
|
|
|
2022-12-28 20:16:23 +01:00
|
|
|
# This is required due to some stuff with dev-dependencies,
|
|
|
|
# backwards compatability and cargo:
|
|
|
|
# https://doc.rust-lang.org/nightly/cargo/reference/unstable.html#scrape-examples
|
|
|
|
doc-scrape-examples = true
|
|
|
|
|
2021-07-12 15:58:51 +02:00
|
|
|
[[example]]
|
|
|
|
name = "erased"
|
2023-10-04 17:42:18 +02:00
|
|
|
required-features = [
|
|
|
|
"tokio/macros",
|
|
|
|
"tokio/rt-multi-thread",
|
|
|
|
"erased",
|
|
|
|
"trace_adaptor",
|
|
|
|
]
|