You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
tourmaline/src/lib.rs

23 lines
660 B
Rust

pub mod error;
pub(crate) mod utils;
use std::path::PathBuf;
use distro::{distro_config::DistroConfig, loader::OSConfigLoader};
use task::task_executor::TaskExecutor;
pub use utils::generate_script_files;
pub mod distro;
pub mod task;
use miette::Result;
/// Creates a new executor with the given os config for the current distro
#[tracing::instrument(level = "trace")]
pub async fn create_executor(os_cfg_path: PathBuf) -> Result<TaskExecutor> {
let distro_config = DistroConfig::load().await?;
let os_config = OSConfigLoader::new(os_cfg_path, &distro_config)
.load()
.await?;
Ok(TaskExecutor::new(os_config, distro_config))
}