-
Notifications
You must be signed in to change notification settings - Fork 55
Expand file tree
/
Copy pathdeny.toml
More file actions
94 lines (86 loc) · 3.49 KB
/
Copy pathdeny.toml
File metadata and controls
94 lines (86 loc) · 3.49 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
# deny.toml
# Configuration for `cargo deny check bans`
#
# This file enforces the workspace's layered architecture rules by preventing
# accidental dependency edges between layers. Dependencies may only flow downward:
# servers may depend on core/protocol/domain, but inner layers must not depend on
# outer layers.
#
# See:
# - docs/packages.md for the layer architecture and forbidden edge table
# - packages/AGENTS.md for the package catalog
[advisories]
# Advisory scanning is a separate concern and not configured here.
[licenses]
# License checking is a separate concern and not configured here.
[bans]
# `multiple-versions` is set to "warn" because the workspace has pre-existing
# duplicate external dependency versions (e.g. `block-buffer`, `sha1`, `toml`).
# Fixing those is out of scope for this layer enforcement configuration and
# would require a separate workspace-wide dependency audit.
multiple-versions = "warn"
wildcards = "deny"
# Ban server-layer crates from being depended on by non-server packages.
# The `wrappers` list specifies which packages are allowed to use each
# server crate as a direct dependency. All other uses (direct or transitive)
# are denied.
deny = [
# axum server crates — only the root binary and other axum servers may depend on them
{ crate = "torrust-tracker-axum-health-check-api-server", wrappers = [
"torrust-tracker",
"torrust-tracker-axum-health-check-api-server",
] },
{ crate = "torrust-tracker-axum-http-server", wrappers = [
"torrust-tracker",
"torrust-tracker-axum-health-check-api-server",
] },
{ crate = "torrust-tracker-axum-rest-api-server", wrappers = [
"torrust-tracker",
"torrust-tracker-axum-health-check-api-server",
] },
{ crate = "torrust-tracker-axum-server", wrappers = [
"torrust-tracker",
"torrust-tracker-axum-health-check-api-server",
"torrust-tracker-axum-http-server",
"torrust-tracker-axum-rest-api-server",
] },
# udp server — only server-layer + root + runtime-adapter may depend on it
{ crate = "torrust-tracker-udp-server", wrappers = [
"torrust-tracker",
"torrust-tracker-axum-health-check-api-server",
"torrust-tracker-axum-rest-api-server",
"torrust-tracker-rest-api-runtime-adapter",
] },
# Protocol crates must not be used directly by torrust-tracker-core.
# Only servers and the respective protocol-specific *-core may depend on them.
{ crate = "torrust-tracker-http-protocol", wrappers = [
"torrust-tracker-axum-http-server",
"torrust-tracker-http-core",
] },
{ crate = "torrust-tracker-udp-protocol", wrappers = [
"torrust-tracker-client-lib",
"torrust-tracker-udp-core",
"torrust-tracker-udp-server",
] },
# REST API protocol — only the REST API layers and client may depend on it
{ crate = "torrust-tracker-rest-api-protocol", wrappers = [
"torrust-tracker",
"torrust-tracker-axum-rest-api-server",
"torrust-tracker-rest-api-application",
"torrust-tracker-rest-api-client",
"torrust-tracker-rest-api-runtime-adapter",
] },
# Core protocol-specific wrappers must not be depended on by tracker-core
{ crate = "torrust-tracker-http-core", wrappers = [
"torrust-tracker",
"torrust-tracker-axum-http-server",
"torrust-tracker-axum-rest-api-server",
"torrust-tracker-rest-api-runtime-adapter",
] },
{ crate = "torrust-tracker-udp-core", wrappers = [
"torrust-tracker",
"torrust-tracker-axum-rest-api-server",
"torrust-tracker-rest-api-runtime-adapter",
"torrust-tracker-udp-server",
] },
]