Skip to main content

Module codegen

Module codegen 

Source
Expand description

Code generation engine for the composable scaffolding system.

This module generates all project files from a CompositionManifest: main.rs, Cargo.toml, .env.example, README.md, and .gitignore.

The generated code uses tracing for logging, anyhow for error handling, and follows ADK-Rust best practices.

Functions§

generate_cargo_toml
Generate Cargo.toml with minimal dependencies from the composition manifest.
generate_env_example
Generate .env.example listing all required environment variables.
generate_gitignore
Generate a standard Rust .gitignore file.
generate_main_rs
Generate src/main.rs with proper composition of template and addons.
generate_project
Generate all project files from a composition manifest.
generate_readme
Generate README.md with template-specific documentation.