forked from serenity-rs/serenity
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathCargo.toml
More file actions
121 lines (106 loc) · 4.03 KB
/
Copy pathCargo.toml
File metadata and controls
121 lines (106 loc) · 4.03 KB
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
[package]
name = "serenity"
version = "0.12.4"
authors = ["Alex M. M. <acdenissk69@gmail.com>"]
description = "A Rust library for the Discord API."
readme = "README.md"
include = ["src/**/*", "LICENSE.md", "README.md", "CHANGELOG.md", "build.rs"]
documentation.workspace = true
homepage.workspace = true
repository.workspace = true
keywords.workspace = true
license.workspace = true
edition.workspace = true
rust-version.workspace = true
[workspace]
members = []
[workspace.package]
documentation = "https://docs.rs/serenity"
homepage = "https://github.com/serenity-rs/serenity"
repository = "https://github.com/serenity-rs/serenity.git"
keywords = ["discord", "api"]
license = "ISC"
edition = "2024"
rust-version = "1.88"
[dependencies]
# Required dependencies
bitflags = "2.4.2"
serde_json = { version = "1.0.108", features = ["raw_value"] }
async-trait = "0.1.74"
tracing = { version = "0.1.40", features = ["log"] }
serde = { version = "1.0.192", features = ["derive", "rc"] }
url = { version = "2.4.1", features = ["serde"] }
tokio = { version = "1.34.0", features = ["macros", "rt", "sync", "time", "io-util"] }
futures = { version = "0.3.29", default-features = false, features = ["std"] }
base64 = { version = "0.22.0" }
arrayvec = { version = "0.7.4", features = ["serde"] }
small-fixed-array = { version = "0.4", features = ["serde"] }
bool_to_bitflags = { version = "0.1.2" }
nonmax = { version = "0.5.5", features = ["serde"] }
to-arraystring = "0.2.0"
extract_map = { version = "0.3.0", features = ["serde"] }
aformat = "0.1.3"
bytes = "1.5.0"
# Optional dependencies
chrono = { version = "0.4.31", default-features = false, features = ["clock", "serde"], optional = true }
reqwest = { version = "0.12.2", default-features = false, features = ["multipart", "stream", "json"], optional = true }
percent-encoding = { version = "2.3.0", optional = true }
mime_guess = { version = "2.0.4", optional = true }
# serde feature only allows for serialisation,
ref-cast = "1.0.23"
[dev-dependencies.http_crate]
version = "1.1.0"
package = "http"
[features]
# Defaults with different backends
default = ["default_no_backend", "rustls_backend"]
default_native_tls = ["default_no_backend", "native_tls_backend"]
# Serenity requires a backend, this picks all default features without a backend.
default_no_backend = [
"chrono",
"http",
"gateway",
"model"
]
# Enables builder structs to configure Discord HTTP requests. Without this feature, you have to
# construct JSON manually at some places.
builder = ["tokio/fs"]
# Enables gateway support, which allows bots to listen for Discord events.
gateway = ["model"]
# Enables HTTP, which enables bots to execute actions on Discord.
http = ["mime_guess", "percent-encoding"]
# Enables wrapper methods around HTTP requests on model types.
# Requires "builder" to configure the requests and "http" to execute them.
# Note: the model type definitions themselves are always active, regardless of this feature.
# TODO: remove dependeny on utils feature
model = ["builder", "http", "utils"]
# Enables support for Discord API functionality that's not stable yet, as well as serenity APIs that
# are allowed to change even in semver non-breaking updates.
unstable = []
# Enables some utility functions that can be useful for bot creators.
utils = []
# Enables unstable tokio features to give explicit names to internally spawned tokio tasks
tokio_task_builder = ["tokio/tracing"]
# Uses chrono for Timestamp, instead of time
chrono = ["dep:chrono"]
# This enables all parts of the serenity codebase
# (Note: all feature-gated APIs to be documented should have their features listed here!)
#
# Unstable functionality should be gated under the `unstable` feature.
full = ["default"]
# Enables compile-time heavy instrument macros from tracing
tracing_instrument = ["tracing/attributes"]
# Backends to pick from:
# - Rustls Backends
rustls_backend = [
"reqwest/rustls-tls",
]
# - Native TLS Backends
native_tls_backend = [
"reqwest/native-tls",
]
# Stub features
cache = []
[package.metadata.docs.rs]
features = ["full"]
rustdoc-args = ["--cfg", "docsrs"]