pub mod archive;
pub mod compile;
pub mod debug;
pub mod manifest;
pub mod manifest_v2;
pub mod platform;
pub mod types;
pub mod validation;
#[cfg(test)]
mod tests;
pub use archive::create_package_archive;
pub use compile::compile_workflow;
pub use debug::{debug_package, extract_manifest_from_package, DebugResult, TaskDebugInfo};
pub use manifest::generate_manifest;
pub use manifest_v2::{
ManifestV2, ManifestValidationError, PackageInfoV2, PackageLanguage, PythonRuntime,
RustRuntime, TaskDefinitionV2,
};
pub use platform::{detect_current_platform, SUPPORTED_TARGETS};
pub use types::CompileOptions;
pub use types::{CargoToml, CompileResult, PackageManifest};
use anyhow::Result;
use std::path::PathBuf;
pub fn package_workflow(
project_path: PathBuf,
output_path: PathBuf,
options: CompileOptions,
) -> Result<()> {
let temp_so = tempfile::NamedTempFile::new()?;
let temp_so_path = temp_so.path().to_path_buf();
let compile_result = compile_workflow(project_path, temp_so_path, options)?;
create_package_archive(&compile_result, &output_path)?;
Ok(())
}