pub(crate) fn main()Expand description
The primary entry point for the Maintain Orchestrator binary.
This function serves as the bridge between the Cargo binary definition and the Build/Run modules’ orchestration logic. It supports three modes:
§Mode 1: Run Mode (–run flag)
When called with the --run flag, uses the development run workflow:
cargo run --bin Maintain -- --run --profile debug-mountain
cargo run --bin Maintain -- --run --list-profiles§Mode 2: Build Mode (default or –build flag)
When called with CLI arguments (without –run), uses the build workflow:
cargo run --bin Maintain -- --profile debug-mountain
cargo run --bin Maintain -- --list-profiles§Mode 3: Legacy Mode (environment variable based)
When called with a -- separator followed by a build command, uses the
traditional environment variable-based build system:
./Target/release/Maintain -- pnpm tauri build --debug
./Target/release/Maintain -- pnpm tauri devThe function is marked as #[allow(dead_code)] because when this file
is used as a library module, the main function may not be called directly.
However, when compiled as a binary, this main function is the entry point.