aion_package/lib.rs
1//! Archive validation, content hashing, and namespacing for Aion packages.
2//!
3//! This crate loads `.aion` archives, validates manifests and BEAM entries,
4//! computes stable content hashes, and derives deployed module names for engine
5//! registration.
6//!
7//! # Example
8//!
9//! ```no_run
10//! use aion_package::Package;
11//!
12//! let package = Package::load_from_path("workflow.aion")?;
13//! println!("entry module: {}", package.manifest().entry_module);
14//! # Ok::<(), Box<dyn std::error::Error>>(())
15//! ```
16
17/// Compiled BEAM module records extracted from packages.
18pub mod beam;
19/// Archive builder utilities for tests and packaging tools.
20pub mod builder;
21/// Package validation and archive-loading errors.
22pub mod error;
23/// Stable content-hash calculation for package contents.
24pub mod hash;
25/// Manifest structures and format-version constants.
26pub mod manifest;
27/// Deployment namespace helpers for compiled module names.
28pub mod namespace;
29/// Validated in-memory package loading and accessors.
30pub mod package;
31/// Project-level packaging driven by `workflow.toml` descriptors.
32pub mod project;
33/// Workflow version identifiers derived from package content.
34pub mod version;
35
36pub use beam::{BeamModule, BeamSet, RESERVED_MODULE_NAMES};
37pub use builder::PackageBuilder;
38pub use error::PackageError;
39pub use hash::{ContentHash, content_hash};
40pub use manifest::{CURRENT_FORMAT_VERSION, DeclaredActivity, Manifest, ManifestVersion};
41pub use namespace::{
42 DEPLOYED_NAME_SEPARATOR, NamespaceError, ParsedDeployedName, deployed_name, deployed_names,
43 parse_deployed_name,
44};
45pub use package::Package;
46pub use project::{
47 ExcludedModule, ExcludedReason, PackageOptions, PackagedWorkflow, PackagingError,
48 ProjectReport, package_project,
49};
50pub use version::WorkflowVersion;