Skip to main content

generate_activities

Function generate_activities 

Source
pub fn generate_activities(
    root: &Path,
    declarations: &[ActivityDeclaration],
    types: &[BoundaryType],
    mode: CodegenMode,
) -> Result<ActivityReport, CodegenError>
Expand description

Generates (or, in CodegenMode::Check, verifies) the activity plumbing for the package at root from its declarations and boundary types.

§Errors

Returns a CodegenError for an unreadable gleam.toml, a declared value type not present in the types module (CodegenError::ActivityTypeMissing), a write failure, or — in check mode — a missing or drifted generated file. No file is written if rendering any artifact fails.