forked from serenity-rs/serenity
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Cargo.toml
257 lines (219 loc) · 5.48 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
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
[package]
authors = ["Alex M. M. <acdenissk69@gmail.com>"]
description = "A Rust library for the Discord API."
documentation = "https://docs.rs/serenity"
homepage = "https://github.com/serenity-rs/serenity"
keywords = ["discord", "api"]
license = "ISC"
name = "serenity"
readme = "README.md"
repository = "https://github.com/serenity-rs/serenity.git"
version = "0.10.9"
edition = "2018"
include = ["src/**/*", "LICENSE.md", "README.md", "CHANGELOG.md", "build.rs"]
[workspace]
members = [
"examples/e01_basic_ping_bot",
"examples/e02_transparent_guild_sharding",
"examples/e03_struct_utilities",
"examples/e04_message_builder",
"examples/e05_command_framework",
"examples/e06_sample_bot_structure",
"examples/e07_env_logging",
"examples/e08_shard_manager",
"examples/e09_create_message_builder",
"examples/e10_collectors",
"examples/e11_gateway_intents",
"examples/e12_global_data",
"examples/e13_parallel_loops",
"examples/e14_slash_commands",
"examples/e15_simple_dashboard",
"examples/e16_sqlite_database",
"examples/e17_message_components"
]
[dependencies]
bitflags = "1.1"
serde_json = "1.0.75"
async-trait = "0.1.9"
[dependencies.simd-json]
version = "0.4"
optional = true
[dependencies.tracing]
version = "0.1.23"
features = ["log"]
[dependencies.command_attr]
path = "./command_attr"
version = "0.3.7"
optional = true
[dependencies.serde]
version = "1.0.130"
features = ["derive"]
[dependencies.url]
version = "^2.1"
features = ["serde"]
[dependencies.uwl]
optional = true
version = "0.6.0"
[dependencies.base64]
optional = true
version = "0.13"
[dependencies.chrono]
default-features = false
features = ["clock", "serde"]
version = "0.4.10"
[dependencies.flate2]
optional = true
version = "1.0.13"
[dependencies.reqwest]
default-features = false
features = ["json", "multipart", "stream"]
optional = true
version = "0.11.7"
# Tokio v0.2
[dependencies.reqwest_compat]
package = "reqwest"
default-features = false
features = ["json", "stream"]
optional = true
version = "0.10"
[dependencies.serenity-voice-model]
path = "./voice-model"
version = "0.1"
optional = true
[dependencies.static_assertions]
optional = true
version = "1.1"
[dependencies.async-tungstenite]
default-features = false
features = ["tokio-runtime"]
optional = true
version = "0.16"
# Tokio v0.2
[dependencies.async-tungstenite_compat]
package = "async-tungstenite"
default-features = false
features = ["tokio-runtime"]
optional = true
version = "0.9.2"
[dependencies.typemap_rev]
optional = true
version = "0.1.3"
[dependencies.bytes]
optional = true
version = "1.0"
[dependencies.bytes_compat]
package = "bytes"
optional = true
version = "0.5"
[dependencies.tokio]
version = "1"
default-features = true
optional = true
features = ["fs", "macros", "rt", "sync", "time"]
# Tokio v0.2
[dependencies.tokio_compat]
package = "tokio"
version = "0.2"
optional = true
default-features = true
features = ["fs", "macros", "rt-core", "sync", "time", "stream"]
[dependencies.futures]
version = "0.3"
default-features = false
features = ["std"]
[dependencies.percent-encoding]
version = "2.1"
[dependencies.mime]
version = "0.3.16"
[dependencies.mime_guess]
version = "2.0"
[dependencies.dashmap]
version = "5.0"
features = ["serde"]
optional = true
[dependencies.parking_lot]
version = "0.11"
optional = true
[dev-dependencies.http_crate]
version = "0.2"
package = "http"
[dev-dependencies.serde_test]
version = "1"
[dev-dependencies.tokio-test]
version = "0.4"
[features]
# Defaults with different backends
default = ["default_no_backend", "rustls_backend"]
default_native_tls = ["default_no_backend", "native_tls_backend"]
default_tokio_0_2 = ["default_no_backend", "rustls_tokio_0_2_backend"]
default_native_tls_tokio_0_2 = [
"default_no_backend",
"native_tls_tokio_0_2_backend",
]
# Serenity requires a backend, this picks all default features without a backend.
default_no_backend = [
"builder",
"cache",
"client",
"framework",
"gateway",
"model",
"http",
"standard_framework",
"utils",
]
builder = ["utils"]
cache = ["dashmap", "parking_lot"]
collector = ["gateway", "model"]
client = ["http", "typemap_rev"]
extras = []
framework = ["client", "model", "utils"]
gateway = ["flate2", "http", "utils"]
http = []
absolute_ratelimits = ["http"]
model = ["builder", "http"]
voice-model = ["serenity-voice-model"]
standard_framework = ["framework", "uwl", "command_attr", "static_assertions"]
unstable_discord_api = []
utils = ["base64"]
voice = ["client", "model"]
# Enables simd accelerated parsing
simdjson = ["simd-json"]
# Backends to pick from:
# - Rustls Backends
rustls_backend = [
"reqwest/rustls-tls",
"async-tungstenite/tokio-rustls-webpki-roots",
"tokio",
"rustls_backend_marker",
"bytes",
]
rustls_tokio_0_2_backend = [
"reqwest_compat/rustls-tls",
"async-tungstenite_compat/tokio-rustls",
"tokio_compat",
"bytes_compat",
"rustls_backend_marker",
]
# Marks that a Rustls backend is active
rustls_backend_marker = []
# - Native TLS Backends
native_tls_backend = [
"reqwest/native-tls",
"async-tungstenite/tokio-native-tls",
"tokio",
"bytes",
"native_tls_backend_marker",
]
native_tls_tokio_0_2_backend = [
"reqwest_compat/native-tls",
"async-tungstenite_compat/tokio-native-tls",
"tokio_compat",
"bytes_compat",
"native_tls_backend_marker",
]
# Marks that a Native TLS backend is active
native_tls_backend_marker = []
[package.metadata.docs.rs]
all-features = true
rustdoc-args = ["--cfg", "docsrs"]