//! Rhai integration for the OS System package
//!
//! This module provides a unified registration function for all OS system-related
//! Rhai bindings.
//!
//! Note: Installation utilities are available through the separate `herolib-installers` package.
//! Kubernetes and virtualization module registration is available through the separate
//! `herolib-virt` package.

use rhai::{Engine, EvalAltResult};

// Re-export the individual module registration functions
pub use crate::git::rhai::register_git_module;
pub use crate::net::rhai::register_net_module;
pub use crate::os::rhai::register_os_module;
pub use crate::process::rhai::register_process_module;

/// Register all system module functions with the Rhai engine
///
/// This is a convenience function that registers all available system modules
/// at once. Note: Installation utilities must be registered separately from the
/// `herolib-installers` package. Kubernetes and virtualization modules must be registered 
/// separately from the `herolib-virt` package.
///
/// # Arguments
///
/// * `engine` - The Rhai engine to register the functions with
///
/// # Returns
///
/// * `Result<(), Box<EvalAltResult>>` - Ok if registration was successful, Err otherwise
pub fn register_system_module(engine: &mut Engine) -> Result<(), Box<EvalAltResult>> {
    register_os_module(engine)?;
    register_process_module(engine)?;
    register_git_module(engine)?;
    register_net_module(engine)?;

    Ok(())
}
