ninja/lib.rs
1//! # Ninja Core Library
2//!
3//! The core library for Ninja, a service orchestration and management framework.
4//! This library provides the foundational components for managing Shurikens
5//! (services) including configuration, scripting, installation, and lifecycle management.
6//!
7//! ## Main Components
8//!
9//! - [`manager`]: Main orchestrator for Shuriken management (`ShurikenManager`)
10//! - [`shuriken`]: Shuriken service representation and operations
11//! - [`common`]: Core types, configuration, and error handling
12//! - [`scripting`]: Lua-based DSL and script execution engine
13//! - [`utils`]: Utility functions for file operations, downloads, and system integration
14//! - [`backup`]: Backup and restore functionality
15//!
16//! ## Quick Start
17//!
18//! ```ignore
19//! use ninja_core::manager::ShurikenManager;
20//!
21//! #[tokio::main]
22//! async fn main() -> anyhow::Result<()> {
23//! // Initialize the manager
24//! let manager = ShurikenManager::new().await?;
25//!
26//! // List all available Shurikens
27//! let shurikens = manager.list(false).await?;
28//!
29//! // Start a specific Shuriken
30//! manager.start(\"my-service\").await?;
31//!
32//! // Configure it
33//! manager.configure(\"my-service\").await?;
34//!
35//! Ok(())
36//! }
37//! ```
38
39/// Backup and restore functionality for Shurikens
40pub mod backup;
41
42/// Core types, configuration, and error definitions\npub mod common;
43pub mod common;
44
45/// Main orchestrator for managing Shuriken services\npub mod manager;
46pub mod manager;
47
48/// Lua scripting engine and DSL support\npub mod scripting;
49pub mod scripting;
50
51/// Individual Shuriken service representation and operations\npub mod shuriken;
52pub mod shuriken;
53
54/// Utility functions for common operations\npub mod utils;
55pub mod utils;
56
57/// Version string from Cargo.toml\npub const VERSION: &str = env!(\"CARGO_PKG_VERSION\");
58pub const VERSION: &str = env!("CARGO_PKG_VERSION");