Skip to main content

aion_package/codegen/
mod.rs

1//! Types-first codec generation (`aion generate`).
2//!
3//! The authored source of truth is the project's Gleam types module
4//! `src/<package>_io.gleam` (ADR-014, resolved types-first on 2026-07-02).
5//! [`boundary_types_from_interface`] maps the `gleam export package-interface`
6//! JSON — the CLI drives the toolchain; this library never spawns a process —
7//! into the boundary-type model, from which every artifact is generated:
8//! the codecs module ([`generate_codecs`]), the emitted `schemas/*.json`
9//! ([`emit_schemas`]), and the declaration-driven activity plumbing
10//! ([`generate_activities`], [`generate_test_scaffold`]).
11//! [`CodegenMode::Check`] verifies the on-disk artifacts instead of writing,
12//! for CI drift gates. Everything observable is in the returned reports or
13//! [`CodegenError`].
14
15mod activity_golden;
16mod activity_model;
17mod activity_project;
18mod activity_worker_python;
19mod activity_worker_rust;
20mod activity_wrappers;
21mod codec_module;
22mod declaration;
23mod error;
24mod input_skeleton;
25mod interface;
26mod model;
27mod names;
28mod project;
29mod schema_emit;
30mod test_scaffold;
31
32pub use activity_project::{
33    ActivityArtifact, ActivityReport, CodecReport, TestScaffoldReport, generate_activities,
34    generate_codecs, generate_test_scaffold,
35};
36pub use declaration::{ActivityDeclaration, Tier, parse_declarations};
37pub use error::CodegenError;
38pub use input_skeleton::build_input_skeleton;
39pub use interface::boundary_types_from_interface;
40pub use model::BoundaryType;
41pub use project::CodegenMode;
42pub use schema_emit::{SchemaEmitReport, emit_schemas};