-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathCargo.toml
More file actions
130 lines (105 loc) · 4.85 KB
/
Copy pathCargo.toml
File metadata and controls
130 lines (105 loc) · 4.85 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
[package]
name = "malkuth"
description = "A composable service-supervision toolkit for Rust"
version = "0.2.12"
edition = "2024"
rust-version = "1.85"
authors = ["langyo <langyo.china@gmail.com>"]
license-file = "LICENSE"
repository = "https://github.com/celestia-island/malkuth"
readme = "README.md"
keywords = ["supervisor", "graceful-shutdown", "rolling-update", "jsonrpc", "socket-activation"]
categories = ["asynchronous", "network-programming", "development-tools"]
publish = true
exclude = ["docs/", "scripts/", ".github/", "justfile", "rust-toolchain.toml"]
[package.metadata.docs.rs]
all-features = true
[features]
default = ["tcp", "signals"]
# ── JSON-RPC transports ────────────────────────────────────────
tcp = []
ws = ["dep:tokio-tungstenite"]
ipc = ["dep:interprocess"]
# ── default facilities ─────────────────────────────────────────
signals = []
worker = []
probes = ["dep:axum"]
# ── CoordinationLock backends ──────────────────────────────────
file-lock = []
lease = []
pg-lock = ["dep:tokio-postgres"]
# ── fault-tolerance strategy ───────────────────────────────────
replica = []
leader-follower = ["lease"]
# ── schema generation ──────────────────────────────────────────
schema = ["dep:schemars"]
# ── CLI binary ─────────────────────────────────────────────────
cli = ["dep:clap", "dep:notify", "dep:tracing-subscriber", "dep:chrono", "dep:toml", "dep:axum", "dep:tera", "dep:sha2", "dep:reqwest", "dep:kou", "dep:hyper", "dep:hyper-util"]
# ── MCP server ─────────────────────────────────────────────────
# Standalone MCP (Model Context Protocol) server exposing supervision + probe
# tools over stdio. Pulls in rmcp + reqwest (for the probe tool).
mcp = ["dep:rmcp", "schema", "worker", "dep:reqwest", "tokio/io-std"]
[[bin]]
name = "malkuth"
required-features = ["cli"]
[dependencies]
serde = { version = "^1", features = ["derive"] }
serde_json = "^1"
schemars = { version = "^1", features = ["derive"], optional = true }
thiserror = "^2"
async-trait = "^0.1"
tracing = "^0.1"
futures-util = { version = "^0.3", features = ["io"] }
tokio = { version = "^1", features = ["rt", "rt-multi-thread", "macros", "net", "signal", "sync", "time", "process", "io-util", "fs"] }
tokio-tungstenite = { version = "^0.29", optional = true }
interprocess = { version = "^2", optional = true, features = ["tokio"] }
axum = { version = "^0.8", optional = true }
# Raw HTTP/1.1 upgrade support for the `--serve` proxy tunnel (the `OnUpgrade`
# extension type plus the upgraded stream bridge). axum 0.8 no longer
# re-exports `axum::hyper`, so hyper is a direct dependency; only the
# always-on `upgrade` module types are used.
hyper = { version = "^1", optional = true }
hyper-util = { version = "^0.1", optional = true, features = ["tokio"] }
tera = { version = "^2", optional = true }
tokio-postgres = { version = "^0.7", optional = true }
# CLI-only deps
clap = { version = "^4", features = ["derive"], optional = true }
notify = { version = "^8", optional = true }
tracing-subscriber = { version = "^0.3", optional = true, features = ["env-filter"] }
chrono = { version = "^0.4", optional = true }
toml = { version = "^1", optional = true }
sha2 = { version = "^0.11", optional = true }
# MCP (optional, for standalone MCP server)
rmcp = { version = "^1", optional = true, features = ["server", "transport-io", "macros"] }
# HTTP client for the probe tool (healthz/readyz checks).
reqwest = { version = "^0.13", optional = true, default-features = false, features = ["rustls"] }
kou = { version = "^0.1", optional = true }
regex = { version = "^1", optional = true }
[target.'cfg(unix)'.dependencies]
libc = "^0.2"
[dev-dependencies]
tokio = { version = "^1", features = ["rt", "rt-multi-thread", "macros", "net", "signal", "sync", "time", "process", "io-util", "fs"] }
criterion = { version = "^0.5", features = ["async_tokio"] }
[[bench]]
name = "rpc"
harness = false
required-features = ["tcp"]
[[bench]]
name = "proxy"
harness = false
required-features = ["tcp"]
[[example]]
name = "test_app"
required-features = ["tcp", "worker", "signals"]
[[example]]
name = "minimal_server"
required-features = ["tcp", "signals"]
[[example]]
name = "supervised_workers"
required-features = ["worker"]
[[example]]
name = "coordination_lock"
required-features = ["file-lock", "lease"]
[profile.release]
opt-level = 3
lto = "thin"