02_explicit_manifests/explicit_manifests.rs
1// =============================================================================
2// #######
3// ### ### F: explicit_manifests.rs
4// ## ## ## ## P: AppCore-Runtime
5// ## ##
6// C: 2026/09/04 00:00:00 by dnettoRaw
7// ## ## ## ## U: 2026/09/04 00:00:00 by dnettoRaw
8// ########### S: 1.0.0-rc.1
9// =============================================================================
10
11//! Keep the same `App` shape while replacing zero-config contracts explicitly.
12//!
13//! This example begins with validated local defaults only to make copies that
14//! an application can inspect or replace before it starts its callback.
15
16use appcore_sdk::prelude::*;
17
18fn main() -> AppResult<()> {
19 // The defaults are regular V1 contracts, not a second SDK format.
20 let defaults = App::new("explicit-manifests")?;
21
22 let application = defaults.effective_application_manifest().clone();
23 let deployment = defaults.effective_deployment_manifest().clone();
24
25 // Explicit inputs replace the defaults after their normal validation.
26 App::new("explicit-manifests")?
27 .application_manifest(application)?
28 .deployment_manifest(deployment)?
29 .run(|app| {
30 let log = app.logger().component("manifest");
31
32 log.info("Explicit V1 manifests are now in effect");
33
34 Ok(())
35 })
36}