-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathCargo.toml
More file actions
56 lines (45 loc) · 1.63 KB
/
Cargo.toml
File metadata and controls
56 lines (45 loc) · 1.63 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
[package]
name = "http-relay"
description = "A Rust implementation of _some_ of [Http relay spec](https://httprelay.io/)."
version = "0.7.0"
edition = "2021"
authors = ["SeverinAlexB"]
license = "MIT"
homepage = "https://github.com/pubky/http-relay"
repository = "https://github.com/pubky/http-relay"
keywords = ["httprelay", "http", "relay"]
categories = ["web-programming"]
[dependencies]
anyhow = "1.0.100"
bytes = "1"
futures-util = "0.3.31"
tokio = { version = "1.49.0", features = ["full"] }
tracing = "0.1.44"
# Optional: server feature
axum = { version = "0.8.8", optional = true }
http-body = { version = "1.0", optional = true }
axum-server = { version = "0.8.0", optional = true }
tower-http = { version = "0.6.8", features = ["cors", "trace"], optional = true }
url = { version = "2.5.8", optional = true }
# Optional: persist feature
rusqlite = { version = "0.32", features = ["bundled"], optional = true }
# Optional: CLI (binary only)
clap = { version = "4", features = ["derive"], optional = true }
tracing-subscriber = { version = "0.3", features = ["env-filter"], optional = true }
[features]
default = ["cli", "persist", "link-compat"]
# HTTP server (axum + handlers + middleware)
server = ["dep:axum", "dep:http-body", "dep:axum-server", "dep:tower-http", "dep:url"]
# SQLite persistence (without this: in-memory HashMap storage)
persist = ["dep:rusqlite"]
# Legacy /link/{id} endpoint compatibility (deprecated)
link-compat = []
# CLI binary
cli = ["dep:clap", "dep:tracing-subscriber", "server"]
[[bin]]
name = "http-relay"
path = "src/main.rs"
required-features = ["cli"]
[dev-dependencies]
axum-test = "18.7.0"
http-body-util = "0.1"