Skip to main content

Module codegen

Module codegen 

Source
Expand description

Generator trait, dyn-erasure wrapper, and orchestration.

Each language target implements Generator with its own associated Config type. The orchestrator works on the object-safe DynGenerator trait, which erases the concrete config and is what tests and the CLI pass into Orchestrator::with_generator. The recommended way to produce a &dyn DynGenerator is to build a ConfiguredGenerator that pairs a typed generator with its concrete config value.

Re-exports§

pub use writer::CodeWriter;

Modules§

common
Shared codegen primitives that every language generator can reuse.
writer
A small, deterministic code-emission toolkit shared by every generator.

Structs§

ConfiguredGenerator
Binds a Generator to a concrete Generator::Config value so it can be erased to &dyn DynGenerator.
Orchestrator
Runs a set of configured generators: it capability-gates each target, skips the ones whose cached hash is still current, and renders the rest in parallel.
OrchestratorHooks
Global hooks the orchestrator runs around the parallel codegen pass.

Traits§

DynGenerator
Object-safe view of a Generator paired with a concrete config.
Generator
A language code generator.