dmsc/core/
runtime.rs

1//! Copyright © 2025-2026 Wenze Wei. All Rights Reserved.
2//! 
3//! This file is part of DMSC.
4//! The DMSC project belongs to the Dunimd Team.
5//! 
6//! Licensed under the Apache License, Version 2.0 (the "License");
7//! you may not use this file except in compliance with the License.
8//! You may obtain a copy of the License at
9//! 
10//!     http://www.apache.org/licenses/LICENSE-2.0
11//! 
12//! Unless required by applicable law or agreed to in writing, software
13//! distributed under the License is distributed on an "AS IS" BASIS,
14//! WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15//! See the License for the specific language governing permissions and
16//! limitations under the License.
17
18#![allow(non_snake_case)]
19
20//! # Application Runtime and Builder
21//! 
22//! This module provides the application runtime and builder for constructing DMSC applications.
23//! The `DMSCAppBuilder` follows the builder pattern for fluent configuration, while the `DMSCAppRuntime`
24//! manages the application lifecycle and module execution.
25//! 
26//! ## Key Components
27//! 
28//! - **DMSCAppBuilder**: Fluent API for configuring and building DMSC applications
29//! - **DMSCAppRuntime**: Manages the application lifecycle and module execution
30//! 
31//! ## Design Principles
32//! 
33//! 1. **Builder Pattern**: The `DMSCAppBuilder` provides a fluent API for configuring applications
34//! 2. **Module Lifecycle**: Modules go through a well-defined lifecycle with init, start, and shutdown phases
35//! 3. **Dependency Resolution**: Modules are sorted based on dependencies and priority
36//! 4. **Async Support**: Full support for both synchronous and asynchronous modules
37//! 5. **Fault Tolerance**: Non-critical modules can fail without crashing the entire application
38
39// Re-export from app_builder.rs
40pub use super::app_builder::DMSCAppBuilder;
41
42// Re-export from app_runtime.rs
43pub use super::app_runtime::DMSCAppRuntime;