diff --git a/Cargo.toml b/Cargo.toml index 8b101b6..362b77d 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -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" diff --git a/src/cluster.rs b/src/cluster.rs new file mode 100644 index 0000000..9326694 --- /dev/null +++ b/src/cluster.rs @@ -0,0 +1,6 @@ +//! RFC 010 — clustering (smarm⇄smarm, explicit remote boundary). +//! +//! c1: feature flag + optional deps only. The owned envelope (c2), transport +//! trait (c3), and everything above them land in later chunks. This module is +//! intentionally empty so the `cluster` feature's default-build invariance is +//! reviewable in isolation. diff --git a/src/lib.rs b/src/lib.rs index 7dfb3f4..3a6ee80 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -14,6 +14,8 @@ pub mod actor; pub mod causal; pub mod channel; +#[cfg(feature = "cluster")] +pub mod cluster; pub mod context; pub mod gen_server; pub mod gen_statem;