-
Notifications
You must be signed in to change notification settings - Fork 0
/
Cargo.toml
88 lines (67 loc) · 2.75 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
[package]
name = "azure_app_exporter"
version = "0.2.0"
edition = "2021"
description = "Expose Prometheus metrics for expiring Azure password credentials"
license = "Apache-2.0"
[workspace.dependencies]
serde_json = "1.0.128"
[dependencies]
# "http2" for clients that support it
axum = { version = "0.7.7", features = ["http2"] }
# "erased-json" for serializing borrowed instead of only owned data, "typed-header" for detecting requests from Swagger UI and truncating responses
axum-extra = { version = "0.9.4", features = ["erased-json", "typed-header"] }
# For starting the server in HTTPS if possible
axum-server = { version = "0.6.0", features = ["tls-rustls"] }
# "clock" for calculating seconds until a password credential expires, "serde" for revealing the date time in API responses
chrono = { version = "0.4.38", default-features = false, features = [
"clock",
"serde",
] }
# For parsing duration strings like "15m"
humantime-serde = "1.1.1"
# For recording metrics
metrics = "0.23.0"
# For exposing recorded metrics in Prometheus format
metrics-exporter-prometheus = { version = "0.15.3", default-features = false }
# For collecting process metrics, like memory usage
metrics-process = "2.1.0"
# For automatically removing metrics that have not been updated for a given span of time
metrics-util = { version = "0.17.0", default-features = false }
# HTTP client
reqwest = { version = "0.12.7", default-features = false, features = [
"rustls-tls-native-roots",
"json",
] }
# For more control over the allowed TLS configuration
rustls = { version = "0.21.12", default-features = false, features = ["tls12"] }
# For reading PEM files
rustls-pemfile = "2.1.3"
serde = { version = "1.0.210", features = ["derive"] }
serde_json.workspace = true
tokio = { version = "1.40.0", default-features = false, features = [
"rt-multi-thread",
"macros",
] }
# For reading the settings file
toml = "0.8.19"
# For logging
tracing = "0.1.40"
tracing-subscriber = { version = "0.3.18", features = ["env-filter", "json"] }
# For generating OpenAPI documentation
utoipa = { version = "4.2.3", features = [
"axum_extras",
"preserve_order",
"chrono",
] }
# For hosting Swagger UI for the OpenAPI documentation
utoipa-swagger-ui = { version = "7.1.0", features = ["axum"] }
[build-dependencies]
# For collecting some host information at compile-time and exposing it as metrics
serde_json.workspace = true
# Make the binary as small, but fast as possible when compiled in Release mode
[profile.release]
panic = "abort" # Strip stack unwind on panic to reduce binary size
codegen-units = 1 # Compile crates one after another so the compiler can optimize better
lto = true # Enable link time optimizations
strip = true # Remove debug symbols to reduce binary size