-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathCargo.toml
215 lines (186 loc) · 7.73 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
[package]
name = "roadster"
version = "0.6.24"
edition = "2021"
publish = true
description = "A \"Batteries Included\" web framework for rust designed to get you moving fast."
repository = "https://github.com/roadster-rs/roadster"
license = "MIT OR Apache-2.0"
keywords = ["web", "framework"]
categories = ["web-programming", "web-programming::http-server"]
# Determined using `cargo msrv` -- https://github.com/foresterre/cargo-msrv
rust-version = "1.81"
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
[features]
default = ["sidekiq", "db-sql", "open-api", "jwt-ietf", "cli", "otel"]
http = ["dep:axum", "dep:axum-extra", "dep:tower", "dep:tower-http", "dep:http-body-util", "dep:mime"]
open-api = ["http", "dep:aide", "dep:schemars"]
sidekiq = ["dep:rusty-sidekiq", "dep:bb8", "dep:num_cpus"]
db-sql = ["dep:sea-orm", "dep:sea-orm-migration"]
email = ["dep:lettre"]
email-smtp = ["email"]
email-sendgrid = ["email", "dep:sendgrid"]
jwt = ["dep:jsonwebtoken"]
jwt-ietf = ["jwt"]
jwt-openid = ["jwt"]
cli = ["dep:clap"]
otel = ["dep:opentelemetry", "dep:opentelemetry_sdk", "dep:opentelemetry-otlp", "dep:tracing-opentelemetry", "dep:prost"]
grpc = ["dep:tonic"]
testing = ["dep:insta", "dep:rstest", "dep:testcontainers-modules"]
test-containers = ["testing", "dep:testcontainers-modules"]
testing-mocks = ["testing", "dep:mockall", "sea-orm?/mock"]
config-yml = ["config/yaml"]
[dependencies]
# Config
# We only support `toml` configs currently, and one of the default features (`rust-ini`) pulls in a dependency
# that breaks the coverage build on nightly.
config = { version = "0.14.1", default-features = false, features = ["toml", "convert-case"] }
dotenvy = "0.15.5"
# Tracing
tracing = { workspace = true }
tracing-subscriber = { version = "0.3.17", features = ["env-filter", "json"] }
opentelemetry-semantic-conventions = "0.27.0"
opentelemetry = { version = "0.27.0", features = ["trace", "metrics", "logs"], optional = true }
opentelemetry_sdk = { version = "0.27.1", features = ["tokio", "rt-tokio", "metrics", "logs", "trace"], optional = true }
opentelemetry-otlp = { version = "0.27.0", features = ["metrics", "trace", "logs"], optional = true }
# Roadster technically doesn't need a direct dependency on `prost`, but we add one here to allow our
# `cargo minimal-versions check` check to pass -- `opentelemetry-proto` requires version `0.13.2` or higher
# in order to compile -- it fails to compile with `0.13.1` even though its dependencies don't specify `0.13.2`.
prost = { workspace = true, optional = true }
tracing-opentelemetry = { version = "0.28.0", features = ["metrics"], optional = true }
# HTTP APIs
# `axum-core` is not optional because we use the `FromRef` trait pretty extensively, even in parts of
# the code that wouldn't otherwise need `axum`.
axum-core = { workspace = true }
axum = { workspace = true, features = ["macros"], optional = true }
axum-extra = { workspace = true, features = ["typed-header", "cookie"], optional = true }
tower = { workspace = true, optional = true }
tower-http = { workspace = true, features = ["trace", "timeout", "request-id", "util", "normalize-path", "sensitive-headers", "catch-panic", "compression-full", "decompression-full", "limit", "cors", "set-header"], optional = true }
aide = { workspace = true, features = ["axum", "axum-json", "axum-query", "redoc", "scalar", "macros"], optional = true }
schemars = { workspace = true, optional = true }
http-body-util = { version = "0.1.2", optional = true }
mime = { workspace = true, optional = true }
# DB
sea-orm = { workspace = true, features = ["debug-print", "runtime-tokio-rustls", "sqlx-postgres", "macros"], optional = true }
sea-orm-migration = { workspace = true, features = ["runtime-tokio-rustls", "sqlx-postgres"], optional = true }
# Email
lettre = { workspace = true, features = ["serde"], optional = true }
sendgrid = { workspace = true, optional = true }
# Workers
rusty-sidekiq = { workspace = true, optional = true }
bb8 = { version = "0.8.0", optional = true }
num_cpus = { version = "1.13.0", optional = true }
# Rust async
tokio = { workspace = true }
tokio-util = { workspace = true }
async-trait = { workspace = true }
# Auth
jsonwebtoken = { version = "9.0.0", optional = true }
# CLI
clap = { workspace = true, features = ["derive", "string"], optional = true }
# gRPC
tonic = { workspace = true, optional = true }
# Testing
insta = { workspace = true, optional = true }
rstest = { workspace = true, optional = true }
testcontainers-modules = { workspace = true, features = ["postgres", "redis"], optional = true }
mockall = { workspace = true, optional = true }
# Others
anyhow = { workspace = true }
serde = { workspace = true }
serde_derive = { workspace = true }
serde_json = { workspace = true }
serde_with = { version = "3.7.0", features = ["macros", "chrono_0_4"] }
strum = { workspace = true }
strum_macros = { workspace = true }
itertools = { workspace = true }
toml = "0.8.0"
url = { version = "2.5.0", features = ["serde"] }
uuid = { workspace = true }
futures = "0.3.30"
futures-core = "0.3.31"
chrono = { workspace = true, features = ["serde"] }
byte-unit = { version = "5.0.0", features = ["serde"] }
convert_case = "0.7.1"
const_format = "0.2.32"
typed-builder = { workspace = true }
num-traits = "0.2.14"
validator = { version = "0.19.0", features = ["derive"] }
thiserror = { workspace = true }
# Add latest version of `time` to resolve a build error on nightly
# https://github.com/time-rs/time/issues/681
time = "0.3.36"
cfg-if = { workspace = true }
reqwest = { workspace = true }
[dev-dependencies]
cargo-husky = { version = "1.5.0", default-features = false, features = ["user-hooks"] }
insta = { workspace = true, features = ["json"] }
mockall = { workspace = true }
mockall_double = "0.3.1"
rstest = { workspace = true }
[build-dependencies]
rustc_version = { workspace = true }
[workspace]
members = [".", "examples/*", "book/examples/*", "private/*"]
[workspace.dependencies]
# Tracing
tracing = { version = "0.1.40", features = ["async-await"] }
async-trait = "0.1.74"
# HTTP APIs
aide = { version = "0.14.0", features = ["axum"] }
axum-core = "0.5.0"
axum = "0.8.1"
axum-extra = "0.10.0"
tower-http = "0.6.0"
tower = "0.5.2"
schemars = "0.8.16"
mime = "0.3.17"
# DB
sea-orm = { version = "1.1.2" }
sea-orm-migration = { version = "1.1.2" }
# Email
lettre = "0.11.0"
sendgrid = "0.23.0"
# CLI
clap = { version = "4.3.0", features = ["derive"] }
# gRPC
tonic = { version = "0.12.3" }
prost = { version = "0.13.2" }
tonic-build = { version = "0.12.3" }
# Sidekiq
# Todo: the default `rss-stats` feature has a dependency that currently can't be satisfied (memchr: ~2.3)
rusty-sidekiq = { version = "0.12.0", default-features = false }
# Testing
insta = { version = "1.39.0", features = ["toml", "filters"] }
rstest = { version = "0.24.0", default-features = false }
testcontainers-modules = { version = "0.11.3" }
mockall = "0.13.0"
# Others
# Todo: minimize tokio features included in `roadster`
tokio = { version = "1.39.0", features = ["full"] }
# For CancellationToken
tokio-util = { version = "0.7.10" }
anyhow = "1.0.86"
serde = { version = "1.0.185", features = ["derive"] }
serde_derive = "1.0.185"
serde_json = "1.0.96"
strum = "0.26.0"
strum_macros = "0.26.0"
cfg-if = "1.0.0"
vergen = { version = "9.0.0" }
vergen-gitcl = { version = "1.0.0" }
reqwest = "0.12.8"
itertools = "0.14.0"
cargo-manifest = "0.18.0"
typed-builder = "0.20.0"
rand = "0.8.5"
thiserror = "2.0.9"
uuid = { version = "1.10.0", features = ["v4", "serde"] }
chrono = { version = "0.4.34", features = ["serde"] }
# Build dependencies
rustc_version = "0.4.1"
[package.metadata.docs.rs]
# Have docs.rs pass `--all-features` to ensure all features have their documentation built.
all-features = true
[lints.rust]
unexpected_cfgs = { level = "allow", check-cfg = ['cfg(coverage_nightly)'] }