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 emit;
14mod error;
15mod json;
16mod names;
17mod project;
18mod schema;
19
20pub use error::CodegenError;
21pub use project::{CodegenMode, CodegenReport, codegen_project};