-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathCargo.toml
229 lines (203 loc) Β· 5.03 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
[workspace]
resolver = "2"
members = [
# bin
"bin/bancho",
"bin/bancho-state",
"bin/db-cli",
"bin/gateway",
"bin/bancho-standalone",
"bin/chat",
"bin/geoip",
"bin/signature",
"bin/events",
# db
"core/db",
# domain
"core/domain/bancho",
"core/domain/bancho_state",
"core/domain/chat",
"core/domain/geoip",
"core/domain/users",
# pb
"core/pb",
"core/pb/modules/base",
"core/pb/modules/logs",
"core/pb/modules/bancho",
"core/pb/modules/bancho_state",
"core/pb/modules/chat",
"core/pb/modules/geoip",
"core/pb/modules/signature",
"core/pb/modules/events",
# repo
"core/repositories",
# services
"core/services/bancho",
"core/services/bancho_state",
"core/services/gateway",
"core/services/chat",
"core/services/geoip",
"core/services/signature",
"core/services/events",
# infra
"core/infra/users",
"core/infra/packets",
"core/infra/services",
# frameworks
"frame/logs",
"frame/api",
"frame/rpc",
"frame/rpc/error",
"frame/rpc/error-derive",
"frame/cfg",
"frame/cfg/derive",
"frame/runtime",
# libs
"lib/tools",
"lib/tools/derive",
"lib/bancho-packets",
"lib/bancho-packets/derive",
"lib/snapshot",
"lib/message_queue",
"lib/unique_id",
"lib/proto_build",
]
[workspace.package]
authors = ["Pure-Peace <[email protected]>"]
edition = "2021"
homepage = "https://peace.osu.icu/"
repository = "https://github.com/pure-peace/peace"
license = "MIT"
[workspace.dependencies]
# grpc
tonic = "0.8"
tonic-reflection = "0.6"
tonic-build = "0.8"
prost = "0.11"
prost-types = "0.11"
# async programming
tokio = "1"
tokio-stream = "0.1"
hyper = "0.14"
h2 = "0.3"
futures = "0.3"
futures-util = "0.3"
async-trait = "0.1"
# serde
serde = "1.0"
serde_json = "1.0"
serde_yaml = "0.9"
toml = "0.7"
# axum
axum = "0.6"
axum-server = "0.4"
axum-client-ip = "0.4"
# openapi
utoipa = "3.0"
utoipa-swagger-ui = "3.0"
# tower
tower = "0.4"
tower-http = "0.4"
tower-layer = "0.3"
tower-service = "0.3"
# orm
sea-orm = "0.11"
sea-orm-cli = { version = "0.11", default-features = false }
sea-orm-migration = "0.11"
# cmd
clap = "4.1"
clap3 = { package = "clap", version = "3.2" }
clap4 = { package = "clap", version = "4.1" }
clap-serde-derive = "0.2"
dotenvy = "0.15"
# err
thiserror = "1.0"
anyhow = "1.0"
# logging
tracing = "0.1"
tracing-subscriber = "0.3"
# utils
md5 = "0.7"
rust-argon2 = "1.0"
rand = "0.8"
uuid = "1.3"
regex = "1.7"
once_cell = "1"
chrono = "0.4"
arc-swap = "1.6"
memmap2 = "0.5"
maxminddb = "0.23"
atomic_float = "0.1"
rusty_ulid = "2.0"
ed25519 = "2.2"
ed25519-dalek = "2.0.0-rc.2"
hex = "0.4"
parking_lot = "0.12"
# derives
bitmask-enum = "2.1"
enum-primitive-derive = "0.2"
num-traits = "0.2"
derive_deref = "1.1"
strum = "0.24"
strum_macros = "0.24"
# macros
paste = "1.0"
quote = "1"
syn = "1"
proc-macro2 = "1"
# frameworks
peace_api = { path = "./frame/api" }
peace_logs = { path = "./frame/logs" }
peace_rpc = { path = "./frame/rpc" }
peace_rpc_error = { path = "./frame/rpc/error" }
peace_cfg = { path = "./frame/cfg" }
peace_runtime = { path = "./frame/runtime" }
# core
peace_pb = { path = "./core/pb" }
peace_db = { path = "./core/db" }
peace_repositories = { path = "./core/repositories" }
# pb
pb_base = { path = "./core/pb/modules/base" }
pb_logs = { path = "./core/pb/modules/logs" }
pb_bancho = { path = "./core/pb/modules/bancho" }
pb_bancho_state = { path = "./core/pb/modules/bancho_state" }
pb_chat = { path = "./core/pb/modules/chat" }
pb_geoip = { path = "./core/pb/modules/geoip" }
pb_signature = { path = "./core/pb/modules/signature" }
pb_events = { path = "./core/pb/modules/events" }
# domain
domain_bancho = { path = "./core/domain/bancho" }
domain_bancho_state = { path = "./core/domain/bancho_state" }
domain_chat = { path = "./core/domain/chat" }
domain_geoip = { path = "./core/domain/geoip" }
domain_users = { path = "./core/domain/users" }
# services
core_bancho = { path = "./core/services/bancho" }
core_bancho_state = { path = "./core/services/bancho_state" }
core_gateway = { path = "./core/services/gateway" }
core_chat = { path = "./core/services/chat" }
core_geoip = { path = "./core/services/geoip" }
core_signature = { path = "./core/services/signature" }
core_events = { path = "./core/services/events" }
# libs
bancho-packets = { path = "./lib/bancho-packets" }
tools = { path = "./lib/tools" }
peace_snapshot = { path = "./lib/snapshot" }
peace_message_queue = { path = "./lib/message_queue" }
peace_unique_id = { path = "./lib/unique_id" }
peace_proto_build = { path = "./lib/proto_build" }
# infra
infra_users = { path = "./core/infra/users" }
infra_packets = { path = "./core/infra/packets" }
infra_services = { path = "./core/infra/services" }
[profile.release]
codegen-units = 1 # Compile crates one after another so the compiler can optimize better
lto = true # Enables link to optimizations
opt-level = 3
strip = true
panic = "abort"
[profile.production]
inherits = "release"
[profile.bench]
inherits = "release"
opt-level = 3