sal-virt 0.1.0

SAL Virt - Virtualization and containerization tools including Buildah, Nerdctl, and RFS
Documentation
//! Rhai wrappers for Virt module functions
//!
//! This module provides Rhai wrappers for the functions in the Virt module,
//! including Buildah, Nerdctl, and RFS functionality.

use rhai::{Engine, EvalAltResult};

pub mod buildah;
pub mod nerdctl;
pub mod rfs;

/// Register all Virt module functions with the Rhai engine
///
/// # Arguments
///
/// * `engine` - The Rhai engine to register the functions with
///
/// # Returns
///
/// * `Result<(), Box<EvalAltResult>>` - Ok if registration was successful, Err otherwise
pub fn register_virt_module(engine: &mut Engine) -> Result<(), Box<EvalAltResult>> {
    // Register Buildah module functions
    buildah::register_bah_module(engine)?;

    // Register Nerdctl module functions
    nerdctl::register_nerdctl_module(engine)?;

    // Register RFS module functions
    rfs::register_rfs_module(engine)?;

    Ok(())
}

// Re-export main functions for convenience
pub use buildah::{bah_new, register_bah_module};
pub use nerdctl::register_nerdctl_module;
pub use rfs::register_rfs_module;