feat(cluster): RFC 010 c1 — cluster feature flag + optional serde/postcard deps

Off by default; the default build stays libc-only. serde (payload contract)
and postcard (payload codec) are optional, no default features. src/cluster.rs
is an intentionally empty cfg-gated stub so the flag's default-build
invariance is reviewable in isolation.
This commit is contained in:
Claude
2026-08-14 13:20:20 +00:00
parent ca1c98336e
commit 58a2fe3046
3 changed files with 16 additions and 0 deletions
+8
View File
@@ -33,6 +33,11 @@ budget-accounting = []
# and unflagged; only the optional gen_server transport sits behind this, so a
# release build pays nothing for an observer it never starts.
observer = []
# RFC 010 c1: clustering. Off by default — the default build stays libc-only,
# byte-for-byte (gate checked per phase). serde is the payload contract,
# postcard the payload codec; both minimal (no default features). Everything
# cluster-shaped lives behind this flag.
cluster = ["dep:serde", "dep:postcard"]
# Run-queue selection: exactly one, compile-time (see src/run_queue.rs).
# Non-default variants need --no-default-features (features are additive).
rq-mutex = []
@@ -44,6 +49,9 @@ cc = "1"
[dependencies]
libc = "0.2"
# RFC 010 §2 — only compiled under `--features cluster`.
serde = { version = "1", default-features = false, optional = true }
postcard = { version = "1", default-features = false, optional = true }
[target.'cfg(loom)'.dependencies]
loom = "0.7"