This commit is contained in:
2025-08-05 15:33:03 +02:00
parent 7856fc0a4e
commit 0c02d0e99f
326 changed files with 334 additions and 0 deletions

View File

@@ -0,0 +1,37 @@
//! 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;