refactor: collapse feature flags to federation+nats

This commit is contained in:
2026-10-25 20:37:37 +01:00
parent 933400e1c2
commit 1b7384386a
17 changed files with 54 additions and 97 deletions

View File

@@ -6,19 +6,18 @@ description = "Self-hosted movie diary with REST API and ActivityPub federation"
license = "MIT"
[features]
default = ["sqlite", "sqlite-federation"]
sqlite = ["dep:sqlite", "dep:sqlite-event-queue", "dep:sqlite-search", "infra-wiring/sqlite", "composition/sqlite"]
nats = ["dep:nats", "infra-wiring/nats", "composition/nats"]
# Meta-feature: true when any federation adapter is active — keeps all #[cfg(feature = "federation")] gates working
federation = ["application/federation", "presentation/federation"]
sqlite-federation = [
"sqlite",
"dep:sqlite-federation",
"dep:sqlite-social",
default = ["federation"]
federation = [
"dep:activitypub",
"federation",
"composition/sqlite-federation",
"dep:sqlite-federation",
"application/federation",
"presentation/federation",
"composition/federation",
]
nats = ["dep:nats", "infra-wiring/nats", "composition/nats"]
# deprecated aliases kept so existing deploy commands keep working
sqlite = []
sqlite-federation = ["federation"]
[dependencies]
axum = { workspace = true }
@@ -44,15 +43,14 @@ sqlx = { workspace = true }
infra-wiring = { workspace = true }
async-trait = { workspace = true }
# Optional — database backends
sqlite = { workspace = true, optional = true }
sqlite-event-queue = { workspace = true, optional = true }
sqlite-search = { workspace = true, optional = true }
sqlite = { workspace = true }
sqlite-event-queue = { workspace = true }
sqlite-search = { workspace = true }
sqlite-social = { workspace = true }
# Optional — federation
activitypub = { workspace = true, optional = true }
activitypub = { workspace = true, optional = true }
sqlite-federation = { workspace = true, optional = true }
sqlite-social = { workspace = true, optional = true }
[dev-dependencies]
bytes = { workspace = true }