Expand description
Archive validation, content hashing, and namespacing for Aion packages.
This crate loads .aion archives, validates manifests and BEAM entries,
computes stable content hashes, and derives deployed module names for engine
registration.
§Example
use aion_package::{ExtractionLimits, Package};
// Operator-local file: extraction may run unbounded. Network input must
// use `ExtractionLimits::bounded` instead.
let package = Package::load_from_path("workflow.aion", ExtractionLimits::unbounded())?;
println!("entry module: {}", package.manifest().entry_module);Re-exports§
pub use admission::AdmissionError;pub use admission::UnenforceableSchema;pub use admission::admit_value;pub use admission::declares_nothing;pub use admission::schema_is_usable;pub use awl::AwlSource;pub use beam::BeamModule;pub use beam::BeamSet;pub use beam::RESERVED_MODULE_NAMES;pub use builder::PackageBuilder;pub use canonical::CanonicalJson;pub use canonical::serialize_value;pub use canonical::sorted_entries;pub use codegen::ActivityArtifact;pub use codegen::ActivityDeclaration;pub use codegen::ActivityReport;pub use codegen::AionDependency;pub use codegen::AwlScaffoldError;pub use codegen::AwlWorkerScaffold;pub use codegen::BoundaryType;pub use codegen::CodecReport;pub use codegen::CodegenError;pub use codegen::CodegenMode;pub use codegen::Connection;pub use codegen::ConnectionPlan;pub use codegen::DocumentRoot;pub use codegen::FileOwnership;pub use codegen::ScaffoldedFile;pub use codegen::SchemaEmitReport;pub use codegen::ServableAction;pub use codegen::TestScaffoldReport;pub use codegen::Tier;pub use codegen::WorkerScaffold;pub use codegen::boundary_types_from_interface;pub use codegen::build_input_skeleton;pub use codegen::emit_schemas;pub use codegen::emit_shell_manifest;pub use codegen::generate_activities;pub use codegen::generate_codecs;pub use codegen::generate_test_scaffold;pub use codegen::parse_declarations;pub use codegen::scaffold_awl_worker;pub use compatibility::ContractDiff;pub use compatibility::contract_diffs;pub use contract::ActionBodyContract;pub use contract::ActionContract;pub use contract::ActivityDescriptor;pub use contract::AdditionalWorkflowContract;pub use contract::ChildContract;pub use contract::ContractIdentityError;pub use contract::PackageContract;pub use contract::RetryContract;pub use contract::SignalContract;pub use contract::WorkerContract;pub use error::PackageError;pub use extraction::ExtractionLimits;pub use hash::ContentHash;pub use hash::content_hash;pub use hash::content_hash_with_contract;pub use hash::content_hash_with_timeout;pub use hash::content_hash_with_timeouts;pub use manifest::CURRENT_FORMAT_VERSION;pub use manifest::DeclaredActivity;pub use manifest::Manifest;pub use manifest::ManifestDigest;pub use manifest::ManifestVersion;pub use manifest::WorkflowEntry;pub use namespace::DEPLOYED_NAME_SEPARATOR;pub use namespace::NamespaceError;pub use namespace::ParsedDeployedName;pub use namespace::deployed_name;pub use namespace::deployed_names;pub use namespace::parse_deployed_name;pub use package::Package;pub use project::ExcludedModule;pub use project::ExcludedReason;pub use project::PackageOptions;pub use project::PackagedWorkflow;pub use project::PackagingError;pub use project::ProjectReport;pub use project::package_project;pub use structure::ArmLabel;pub use structure::CorrelationKey;pub use structure::DeterminismError;pub use structure::EdgeKind;pub use structure::FactsError;pub use structure::GraphEdge;pub use structure::GraphNode;pub use structure::NodeId;pub use structure::NodePrimitive;pub use structure::StructuralDelta;pub use structure::StructureError;pub use structure::Violation;pub use structure::ViolationKind;pub use structure::WorkflowFacts;pub use structure::WorkflowGraph;pub use structure::analyze_determinism;pub use structure::extract_structure;pub use structure::extract_workflow_facts;pub use structure::regenerate_gleam;pub use version::WorkflowVersion;
Modules§
- admission
- Declared-contract admission of caller-supplied values at a boundary. Declared-contract admission: does a caller-supplied value satisfy the schema the package committed to?
- awl
- AWL document provenance carried by an archive.
The AWL provenance a
.aionarchive can carry: the authored document and the schema files that document imports. - beam
- Compiled BEAM module records extracted from packages.
BeamModuleandBeamSetwith canonical ordering. - builder
- Archive builder utilities for tests and packaging tools.
PackageBuilderdeterministic write path. - canonical
- Canonical JSON text encoding for emitted artifacts. Canonical JSON text encoding for emitted artifacts.
- codegen
- Gleam type and JSON codec generation from project schemas.
Types-first codec generation (
aion generate). - compatibility
- Worker advertisement compatibility and field-level differences. Worker advertisement comparison against durable package contracts.
- contract
- Durable worker-contract records and canonical identity encoding. Durable worker-contract records and their canonical identity encoding.
- error
- Package validation and archive-loading errors.
Error taxonomy for malformed
.aionpackages. - extraction
- Explicit inflate budgets for archive extraction.
Explicit inflate budgets for
.aionarchive extraction. - hash
- Stable content-hash calculation for package contents. Content-hash computation over the canonical beam set.
- manifest
- Manifest structures and format-version constants.
Typed
manifest.jsonmodel and.aionformat-version checks. - namespace
- Deployment namespace helpers for compiled module names. Pure logical-name <-> deployed-name bijection for content-hash namespacing.
- package
- Validated in-memory package loading and accessors.
Packageload path and integrity check. - project
- Project-level packaging driven by
workflow.tomldescriptors. Project-level packaging:workflow.tomldescriptors → built.aionarchives. - structure
- Workflow primitive-structure projection: the graph model and bounded Gleam regeneration (a projection of the typed source, never authoritative). Workflow structure projection: a graph model derived from the typed source.
- version
- Workflow version identifiers derived from package content.
Canonical workflow version record produced from a loaded
Package.