zinit 0.1.0

Process supervisor with dependency management
Documentation
//! zinit - Process supervisor with dependency management
//!
//! This crate provides a process supervisor similar to systemd but simpler.
//! It includes:
//!
//! - **SDK**: Shared types, configuration, and client libraries
//! - **Server**: The supervisor daemon that manages services
//! - **Client**: CLI interface for interacting with the server
//! - **PID1**: Init process for running as PID 1 in containers/VMs
//!
//! ## Features
//!
//! - `sdk` - Shared types, config, protocol (always included)
//! - `client` - CLI client
//! - `tui` - Terminal UI for client
//! - `repl` - Interactive REPL for client
//! - `server` - Supervisor daemon
//! - `pid1` - PID 1 init process (Linux only)
//! - `async` - Async client support
//!
//! ## Example
//!
//! ```no_run
//! use zinit::{ZinitClient, ServiceConfig};
//!
//! let mut client = ZinitClient::connect_default().unwrap();
//! let services = client.list().unwrap();
//! for name in services {
//!     println!("Service: {}", name);
//! }
//! ```

// SDK module - always available
pub mod sdk;

// Re-export commonly used types from SDK at crate root
pub use sdk::{
    DependencyDef,
    FailureReason,
    LifecycleDef,
    LoggingDef,
    OkResponse,
    RestartPolicy,
    ServiceClass,
    // Config types
    ServiceConfig,
    ServiceDef,
    // State types
    ServiceState,
    ServiceStats,
    // Response types
    ServiceStatus,
    State,
    Status,
    WhyBlocked,
    // Client
    ZinitClient,
    // Modules
    protocol,
    socket,
    validate,
    xinet,
};

// Async client (when async feature enabled)
#[cfg(feature = "async")]
pub use sdk::AsyncZinitClient;

// Server module (when server feature enabled)
#[cfg(feature = "server")]
pub mod server;

// Client module (when client feature enabled)
#[cfg(feature = "client")]
pub mod client;