-
Notifications
You must be signed in to change notification settings - Fork 29
/
Cargo.toml
123 lines (100 loc) · 2.92 KB
/
Cargo.toml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
[package]
name = "frankenstein"
version = "0.37.0"
authors = ["Ayrat Badykov <[email protected]>", "EdJoPaTo <[email protected]>", "Pepe Márquez <[email protected]>"]
description = "Telegram bot API client for Rust"
edition = "2021"
license = "WTFPL"
repository = "https://github.com/ayrat555/frankenstein"
readme = "README.md"
keywords = ["request", "http", "client", "bot", "telegram"]
categories = ["web-programming::http-client"]
[package.metadata.docs.rs]
all-features = true
[features]
default = ["http-client"]
http-client = ["telegram-trait", "dep:ureq", "dep:multipart", "dep:mime_guess", "dep:serde_json"]
telegram-trait = []
async-http-client = ["async-telegram-trait", "dep:reqwest", "dep:tokio", "dep:serde_json"]
async-telegram-trait = ["dep:async-trait"]
[lints.rust]
unsafe_code = "forbid"
[lints.clippy]
pedantic = { level = "warn", priority = -1 }
nursery = { level = "warn", priority = -1 }
struct_excessive_bools = "allow" # due to Telegram API
# TODO: remove and fix (or allow explicitly on the specific problem)
missing_errors_doc = "allow"
option_if_let_else = "allow"
unreadable_literal = "allow"
[[example]]
name = "get_me"
required-features = ["http-client"]
[[example]]
name = "reply_to_message_updates"
required-features = ["http-client"]
[[example]]
name = "reply_keyboard"
required-features = ["http-client"]
[[example]]
name = "inline_keyboard"
required-features = ["http-client"]
[[example]]
name = "custom_client"
required-features = ["http-client"]
[[example]]
name = "async_get_me"
required-features = ["async-http-client"]
[[example]]
name = "async_reply_to_message_updates"
required-features = ["async-http-client"]
[[example]]
name = "async_file_upload"
required-features = ["async-http-client"]
[[example]]
name = "async_custom_client"
required-features = ["async-http-client"]
[[example]]
name = "api_trait_implementation"
required-features = ["telegram-trait"]
[dependencies]
bon = "3.0.0"
macro_rules_attribute = "0.2.0"
paste = "1.0.2"
serde = { version = "1.0.157", features = ["derive"] }
serde_json = { version = "1.0.45", optional = true }
serde_with = "3.0.0"
thiserror = "2"
[dependencies.async-trait]
version = "0.1"
optional = true
[dependencies.mime_guess]
version = "2"
optional = true
[dependencies.multipart]
version = "0.18"
default-features = false
features = ["client"]
optional = true
[target.'cfg(not(target_arch = "wasm32"))'.dependencies.reqwest]
version = "0.12"
default-features = false
features = ["multipart", "stream", "rustls-tls"]
optional = true
[target.'cfg(target_arch = "wasm32")'.dependencies.reqwest]
version = "0.12"
default-features = false
features = ["multipart", "stream"]
optional = true
[target.'cfg(not(target_arch = "wasm32"))'.dependencies.tokio]
version = "1"
features = ["fs"]
optional = true
[dependencies.ureq]
version = "2"
optional = true
[dev-dependencies]
isahc = "1"
mockito = "1.0"
serde_json = "1"
tokio = { version = "1", features = ["full"] }