Skip to main content

aion_package/codegen/
mod.rs

1//! Gleam type + JSON codec generation from a workflow project's JSON
2//! Schemas (`aion codegen`).
3//!
4//! [`codegen_project`] reads a project's `workflow.toml` and every
5//! `schemas/*.json`, and writes one deterministic Gleam module
6//! (`src/<package>_io.gleam`) containing a type plus an encoder/decoder
7//! pair per schema — the schema files stay the single source of truth, and
8//! the generated codecs cannot drift from them. [`CodegenMode::Check`]
9//! verifies the on-disk module instead of writing, for CI gates. The
10//! library never spawns processes; everything observable is in the returned
11//! [`CodegenReport`] or [`CodegenError`].
12
13mod activity_golden;
14mod activity_model;
15mod activity_project;
16mod activity_worker_python;
17mod activity_worker_rust;
18mod activity_wrappers;
19mod declaration;
20mod emit;
21mod error;
22mod input_skeleton;
23mod json;
24mod names;
25mod project;
26mod schema;
27mod test_scaffold;
28
29pub use activity_project::{
30    ActivityArtifact, ActivityReport, CodecReport, TestScaffoldReport, generate_activities,
31    generate_codecs, generate_test_scaffold,
32};
33pub use declaration::{ActivityDeclaration, Tier, parse_declarations};
34pub use error::CodegenError;
35pub use input_skeleton::build_input_skeleton;
36pub use project::{CodegenMode, CodegenReport, codegen_project};