diff --git a/cfgsync/README.md b/cfgsync/README.md index 56ace1e..c4fae33 100644 --- a/cfgsync/README.md +++ b/cfgsync/README.md @@ -34,7 +34,7 @@ This crate is the application-facing integration layer. The main concepts are `R The adapter answers one question: given the current registration snapshot, are artifacts ready yet, and if so, what should be served? -The crate also includes reusable wrappers such as `CachedSnapshotMaterializer`, `PersistingSnapshotMaterializer`, and `RegistrationConfigSource`. `DeploymentAdapter` still exists as a helper for static deployment-driven rendering, but it is a secondary API. The main cfgsync model is registration-backed materialization. +The crate also includes reusable wrappers such as `CachedSnapshotMaterializer`, `PersistingSnapshotMaterializer`, and `RegistrationConfigSource`. Static deployment-driven rendering still exists, but it lives under `cfgsync_adapter::static_deployment` as a secondary helper path. The main cfgsync model is registration-backed materialization. ### `cfgsync-runtime` @@ -64,7 +64,7 @@ Static bundle mode still exists because it is useful when artifacts are already That is appropriate for fully precomputed topologies, deterministic fixtures, and test setups where no runtime coordination is needed. In that mode, cfgsync serves from `NodeArtifactsBundle` through `BundleConfigSource`. -Bundle mode is useful, but it is not the defining idea of the library anymore. The primary model is registration-backed materialization. +Bundle mode is useful, but it is not the defining idea of the library anymore. The primary model is registration-backed materialization, and the static helpers are intentionally kept off the main adapter surface. ## Example: typed registration metadata diff --git a/cfgsync/adapter/src/lib.rs b/cfgsync/adapter/src/lib.rs index d202854..af8f9f1 100644 --- a/cfgsync/adapter/src/lib.rs +++ b/cfgsync/adapter/src/lib.rs @@ -5,10 +5,20 @@ mod registrations; mod sources; pub use artifacts::MaterializedArtifacts; -pub use deployment::{BuildCfgsyncNodesError, DeploymentAdapter, build_materialized_artifacts}; pub use materializer::{ CachedSnapshotMaterializer, DynCfgsyncError, MaterializationResult, MaterializedArtifactsSink, PersistingSnapshotMaterializer, RegistrationSnapshotMaterializer, }; pub use registrations::RegistrationSnapshot; pub use sources::RegistrationConfigSource; + +/// Static deployment helpers for precomputed cfgsync artifact generation. +/// +/// This module is intentionally secondary to the registration-backed +/// materializer flow. Use it when artifacts are already determined by a +/// deployment plan and do not need runtime registration to become available. +pub mod static_deployment { + pub use super::deployment::{ + BuildCfgsyncNodesError, DeploymentAdapter, build_materialized_artifacts, + }; +} diff --git a/logos/runtime/ext/src/cfgsync/mod.rs b/logos/runtime/ext/src/cfgsync/mod.rs index 8bf2162..1e929b8 100644 --- a/logos/runtime/ext/src/cfgsync/mod.rs +++ b/logos/runtime/ext/src/cfgsync/mod.rs @@ -1,5 +1,5 @@ use anyhow::Result; -use cfgsync_adapter::{DeploymentAdapter, build_materialized_artifacts}; +use cfgsync_adapter::static_deployment::{DeploymentAdapter, build_materialized_artifacts}; pub(crate) use cfgsync_core::render::CfgsyncOutputPaths; use cfgsync_core::{ NodeArtifactsBundle, NodeArtifactsBundleEntry, diff --git a/testing-framework/core/src/cfgsync/mod.rs b/testing-framework/core/src/cfgsync/mod.rs index 0d4168a..207265a 100644 --- a/testing-framework/core/src/cfgsync/mod.rs +++ b/testing-framework/core/src/cfgsync/mod.rs @@ -1,5 +1,5 @@ -pub use cfgsync_adapter::*; #[doc(hidden)] -pub use cfgsync_adapter::{ +pub use cfgsync_adapter::static_deployment::{ DeploymentAdapter as CfgsyncEnv, build_materialized_artifacts as build_cfgsync_node_catalog, }; +pub use cfgsync_adapter::*;