Repository navigation
Expand file tree
/
Copy pathCargo.toml
More file actions
233 lines (210 loc) · 8.34 KB
/
Copy pathCargo.toml
File metadata and controls
233 lines (210 loc) · 8.34 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
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
[package]
default-run = "torrust-tracker"
name = "torrust-tracker"
readme = "README.md"
authors.workspace = true
description.workspace = true
documentation.workspace = true
edition.workspace = true
homepage.workspace = true
keywords.workspace = true
license.workspace = true
publish.workspace = true
repository.workspace = true
rust-version.workspace = true
version = "3.0.0-develop"
[lib]
name = "torrust_tracker_lib"
[[test]]
name = "metrics-fixed-ports"
path = "tests/metrics/fixed_ports.rs"
[[test]]
name = "metrics-port-zero"
path = "tests/metrics/port_zero.rs"
[[test]]
name = "metrics-udp-error-enabled-port-zero"
path = "tests/metrics/udp_error_enabled_port_zero.rs"
[[test]]
name = "metrics-udp-error-disabled-port-zero"
path = "tests/metrics/udp_error_disabled_port_zero.rs"
[[test]]
name = "banning-udp-metrics-disabled-port-zero"
path = "tests/banning/udp_metrics_disabled_port_zero.rs"
[[test]]
name = "banning-udp-shared-connection-id-error-limit"
path = "tests/banning/udp_shared_connection_id_error_limit.rs"
[[test]]
name = "banning-udp-shared-connection-id-error-limit-reverse-order"
path = "tests/banning/udp_shared_connection_id_error_limit_reverse_order.rs"
[[test]]
name = "lifecycle-signals"
path = "tests/lifecycle/signals.rs"
[[test]]
name = "persistence-scrape-after-restart"
path = "tests/persistence/scrape_after_restart.rs"
[[test]]
name = "cli-configuration"
path = "tests/configuration/cli_configuration.rs"
[lints]
workspace = true
[workspace.package]
authors = [ "Nautilus Cyberneering <info@nautilus-cyberneering.de>, Mick van Dijke <mick@dutchbits.nl>" ]
categories = [ "network-programming", "web-programming" ]
description = "A feature rich BitTorrent tracker."
documentation = "https://docs.rs/crate/torrust-tracker/"
edition = "2024"
homepage = "https://torrust.com/"
keywords = [ "bittorrent", "file-sharing", "peer-to-peer", "torrent", "tracker" ]
license = "AGPL-3.0-only"
publish = true
repository = "https://github.com/torrust/torrust-tracker"
rust-version = "1.88"
[dependencies]
anyhow = "1"
axum-server = { version = "0", features = [ "tls-rustls-no-provider" ] }
base64 = "0.23.1"
torrust-tracker-http-core = { version = "0.1.0", path = "packages/http-core" }
torrust-tracker-core = { version = "0.1.0", path = "packages/tracker-core" }
torrust-tracker-events = { version = "0.1.0", path = "packages/events" }
torrust-tracker-udp-core = { version = "0.1.0", path = "packages/udp-core" }
chrono = { version = "0", default-features = false, features = [ "clock" ] }
clap = { version = "4", features = [ "derive", "env" ] }
pbkdf2 = "0.13.0"
rand = "0"
regex = "1"
reqwest = { version = "0", features = [ "json", "multipart" ] }
secrecy = "0.10.3"
serde = { version = "1", features = [ "derive" ] }
serde_json = { version = "1", features = [ "preserve_order" ] }
sha1 = "0.11.0"
sha2 = "0.11.0"
tempfile = "3.27.0"
thiserror = "2.0.12"
tokio = { version = "1", features = [ "io-util", "macros", "net", "process", "rt-multi-thread", "signal", "sync", "time" ] }
tokio-util = "0.7.15"
torrust-tracker-axum-health-check-api-server = { version = "0.1.0", path = "packages/axum-health-check-api-server" }
torrust-tracker-axum-http-server = { version = "0.1.0", path = "packages/axum-http-server" }
torrust-tracker-axum-rest-api-server = { version = "0.1.0", path = "packages/axum-rest-api-server" }
torrust-tracker-axum-server = { version = "0.1.0", path = "packages/axum-server" }
torrust-tracker-rest-api-client = { version = "0.1.0", path = "packages/rest-api-client" }
torrust-tracker-rest-api-runtime-adapter = { version = "0.1.0", path = "packages/rest-api-runtime-adapter" }
torrust-tracker-rest-api-protocol = { version = "0.1.0", path = "packages/rest-api-protocol" }
torrust-server-lib = "0.3.0"
torrust-clock = "3.0.0"
torrust-tracker-configuration = { version = "3.0.0", path = "packages/configuration" }
torrust-tracker-primitives = { version = "3.0.0", path = "packages/primitives" }
torrust-tracker-swarm-coordination-registry = { version = "0.1.0", path = "packages/swarm-coordination-registry" }
torrust-tracker-udp-server = { version = "0.1.0", path = "packages/udp-server" }
tracing = "0"
tracing-subscriber = { version = "0", features = [ "json" ] }
[dev-dependencies]
tokio = { version = "1", features = [ "test-util" ] }
torrust-net-primitives = "0.1.0"
torrust-tracker-test-helpers = { version = "3.0.0", path = "packages/test-helpers" }
url = { version = "2", features = [ "serde" ] }
[target.'cfg(unix)'.dev-dependencies]
# `nix` provides typed, safe delivery of POSIX signals to the exact child PID.
nix = { version = "0.31.3", default-features = false, features = [ "signal" ] }
[workspace]
# skill-link: add-workspace-member
# related-artifact: .dockerignore — every member must be admitted to the Docker
# build context so `cargo chef prepare` can run `cargo metadata`.
# Every in-repo crate is listed explicitly (not left to path-dependency
# auto-discovery) so that the cargo-chef `--external-only` skeleton, which strips
# path dependencies, still resolves the same membership and `default-members`.
members = [
"console/tracker-client",
"contrib/dev-tools/analysis/workspace-coupling",
"contrib/dev-tools/checks/agent-review-report-contract",
"contrib/dev-tools/checks/clippy-allow-reasons",
"contrib/dev-tools/checks/frontmatter-validator",
"contrib/dev-tools/checks/package-coverage-check",
"contrib/dev-tools/github/github-review-threads",
"packages/axum-health-check-api-server",
"packages/axum-http-server",
"packages/axum-rest-api-server",
"packages/axum-server",
"packages/configuration",
"packages/e2e-tools",
"packages/events",
"packages/http-core",
"packages/http-protocol",
"packages/persistence-benchmark",
"packages/primitives",
"packages/rest-api-application",
"packages/rest-api-client",
"packages/rest-api-protocol",
"packages/rest-api-runtime-adapter",
"packages/swarm-coordination-registry",
"packages/test-helpers",
"packages/torrent-repository-benchmarking",
"packages/tracker-client",
"packages/tracker-core",
"packages/udp-core",
"packages/udp-protocol",
"packages/udp-server",
]
# Positive list of what is compiled and tested inside the container image
# (`cargo nextest archive` runs without `--workspace` in the Containerfile).
# Developer tools, benchmarks, CLI clients, host-only E2E runners, and the
# AI-harness crates are members but not default members, so they never enter
# the container test archives. Also selects what a bare `cargo build`/`cargo
# test` at the repository root operates on.
default-members = [
".",
"packages/axum-health-check-api-server",
"packages/axum-http-server",
"packages/axum-rest-api-server",
"packages/axum-server",
"packages/configuration",
"packages/events",
"packages/http-core",
"packages/http-protocol",
"packages/primitives",
"packages/rest-api-application",
"packages/rest-api-client",
"packages/rest-api-protocol",
"packages/rest-api-runtime-adapter",
"packages/swarm-coordination-registry",
"packages/test-helpers",
"packages/tracker-client",
"packages/tracker-core",
"packages/udp-core",
"packages/udp-protocol",
"packages/udp-server",
]
[workspace.lints.rust]
deprecated_safe = { level = "deny", priority = -2 }
future_incompatible = { level = "deny", priority = -2 }
let_underscore = { level = "deny", priority = -2 }
nonstandard_style = { level = "deny", priority = -2 }
rust_2018_compatibility = { level = "deny", priority = -2 }
rust_2018_idioms = { level = "deny", priority = -2 }
rust_2021_compatibility = { level = "deny", priority = -2 }
rust_2024_compatibility = { level = "deny", priority = -2 }
unsafe_code = { level = "warn", priority = 0 }
unused = { level = "deny", priority = -2 }
warnings = { level = "deny", priority = -1 }
[workspace.lints.clippy]
all = { level = "deny", priority = -1 }
cognitive_complexity = { level = "deny", priority = -1 }
complexity = { level = "deny", priority = -1 }
correctness = { level = "deny", priority = -1 }
exit = { level = "deny", priority = 0 }
nursery = { level = "warn", priority = -2 }
pedantic = { level = "deny", priority = -1 }
perf = { level = "deny", priority = -1 }
print_stderr = { level = "deny", priority = 0 }
print_stdout = { level = "deny", priority = 0 }
style = { level = "deny", priority = -1 }
suspicious = { level = "deny", priority = -1 }
[profile.dev]
debug = 1
opt-level = 1
[profile.release]
debug = 1
lto = "fat"
opt-level = 3
[profile.release-debug]
debug = true
inherits = "release"