Skip to main content

max / makenotwork

5.4 KB · 169 lines History Blame Raw
1 [workspace]
2 resolver = "2"
3 members = [
4 "crates/mt-core",
5 "crates/mt-db",
6 ]
7 default-members = ["."]
8
9 [workspace.package]
10 version = "0.5.1"
11 edition = "2024"
12 license = "LicenseRef-PolyForm-Noncommercial-1.0.0"
13
14 [workspace.dependencies]
15 # Core
16 tokio = { version = "1", features = ["rt-multi-thread", "sync", "time", "macros", "signal"] }
17 tokio-util = { version = "0.7", features = ["io"] }
18 thiserror = "2"
19 serde = { version = "1", features = ["derive"] }
20 serde_json = "1"
21 tracing = "0.1"
22 tracing-subscriber = { version = "0.3", features = ["env-filter"] }
23
24 # Web
25 axum = { version = "0.8", features = ["ws", "multipart"] }
26 tower = "0.5"
27 tower-http = { version = "0.7", features = ["fs", "cors", "trace", "set-header", "timeout"] }
28 tower-sessions = "0.14"
29 tower-sessions-sqlx-store = { version = "0.15", features = ["postgres"] }
30
31 # HTTP client / crypto
32 # `rustls-no-provider` rather than `rustls`: the latter is an alias for
33 # `__rustls-aws-lc-rs`, which links a C crypto backend. The provider is ring
34 # (pure Rust), installed process-wide by `crate::tls` before any client is built.
35 # `form` is what the OAuth token exchange is sent as (RFC 6749 ยง4.1.3, and what
36 # the MNW server's `axum::Form` extractor accepts); `json` is for reading the
37 # responses back.
38 reqwest = { version = "0.13", default-features = false, features = ["form", "json", "rustls-no-provider"] }
39 rustls = { version = "0.23", default-features = false, features = ["std", "tls12", "logging", "ring"] }
40 # Reads the host trust store, which is what reqwest's platform verifier does on
41 # Linux and what the AWS client behind s3-storage calls directly. Already in the
42 # tree through both of those; declared here so trust_store can probe the same
43 # store the outbound paths will use (deploy/README.md).
44 rustls-native-certs = "0.8"
45 # Pinned to the exact major reqwest resolves so the SSRF pre-check parses the
46 # host with the same parser reqwest connects through (link_preview::validate_url).
47 url = "2"
48 sha2 = "0.11"
49 hmac = "0.13"
50 base64 = "0.22"
51 rand = "0.10"
52
53 # Live chat
54 livechat = { path = "../shared/livechat", features = ["axum"] }
55 async-trait = "0.1"
56 dashmap = "6"
57
58 # S3 storage
59 s3-storage = { path = "../shared/s3-storage" }
60
61 # Database
62 sqlx = { version = "0.8", features = ["runtime-tokio", "postgres", "chrono", "uuid"] }
63
64 # Rate limiting
65 tower_governor = "0.8"
66 governor = "0.10"
67
68 # Utilities
69 chrono = { version = "0.4", features = ["serde"] }
70 uuid = { version = "1", features = ["v4", "serde"] }
71 pulldown-cmark = "0.13"
72 askama = "0.16.0"
73
74 # Internal crates
75 mt-core = { path = "crates/mt-core" }
76 mt-db = { path = "crates/mt-db" }
77 tagtree = { path = "../shared/tagtree" }
78
79 [package]
80 name = "multithreaded"
81 license.workspace = true
82 version.workspace = true
83 edition.workspace = true
84
85 [dependencies]
86 mt-core = { workspace = true }
87 mt-db = { workspace = true }
88 tokio = { workspace = true }
89 tokio-util = { workspace = true }
90 axum = { workspace = true }
91 tower = { workspace = true }
92 tower-http = { workspace = true }
93 tracing = { workspace = true }
94 tracing-subscriber = { workspace = true }
95 serde = { workspace = true }
96 serde_json = { workspace = true }
97 askama = { workspace = true }
98 chrono = { workspace = true }
99 uuid = { workspace = true }
100 sqlx = { workspace = true }
101 tower-sessions = { workspace = true }
102 tower-sessions-sqlx-store = { workspace = true }
103 reqwest = { workspace = true }
104 rustls = { workspace = true }
105 rustls-native-certs = { workspace = true }
106 url = { workspace = true }
107 sha2 = { workspace = true }
108 base64 = { workspace = true }
109 rand = { workspace = true }
110 pulldown-cmark = { workspace = true }
111 docengine = { git = "https://makenot.work/git/max/docengine.git", version = "0.7", features = ["mentions", "quotes"] }
112 tagtree = { workspace = true }
113 tower_governor = { workspace = true }
114 governor = { workspace = true }
115 s3-storage = { workspace = true }
116 livechat = { workspace = true }
117 async-trait = { workspace = true }
118 dashmap = { workspace = true }
119 dotenvy = "0.15"
120 hex = "0.4"
121 hmac = { workspace = true }
122 regex-lite = "0.1"
123 urlencoding = "2"
124 time = "0.3"
125 include_dir = "0.7.4"
126
127 [dev-dependencies]
128 http-body-util = "0.1"
129 wiremock = "0.6"
130 pom-contract = { path = "../shared/pom-contract" }
131 # Enable mt-db's setup-only mutations for the integration suite. Resolver 2 keeps
132 # this feature out of the normal/production build.
133 mt-db = { workspace = true, features = ["test-support"] }
134
135 [workspace.lints.rust]
136 unused = "warn"
137 unreachable_pub = "warn"
138
139 [workspace.lints.clippy]
140 pedantic = { level = "warn", priority = -1 }
141 # Allow-list tuned from a measured breakdown across server/multithreaded/pter
142 # (2026-07-22). These are the high-churn / low-signal pedantic lints; everything
143 # else in `pedantic` stays a warning. Keep this block identical across repos.
144 module_name_repetitions = "allow"
145 # Doc lints. No docs-completeness push is underway.
146 missing_errors_doc = "allow"
147 missing_panics_doc = "allow"
148 doc_markdown = "allow"
149 # Numeric casts. Endemic and mostly intentional in size and byte math.
150 cast_possible_truncation = "allow"
151 cast_sign_loss = "allow"
152 cast_precision_loss = "allow"
153 cast_possible_wrap = "allow"
154 cast_lossless = "allow"
155 # Subjective structure and style nags. High churn, low signal.
156 must_use_candidate = "allow"
157 too_many_lines = "allow"
158 struct_excessive_bools = "allow"
159 similar_names = "allow"
160 items_after_statements = "allow"
161 single_match_else = "allow"
162 # Frequent false-positives in TUI and router-heavy code.
163 match_same_arms = "allow"
164 unnecessary_wraps = "allow"
165 type_complexity = "allow"
166
167 [lints]
168 workspace = true
169