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.

Modules§

common
Shared codegen primitives that every language generator can reuse.
writer
A small indentation-aware string builder shared by every generator.

Structs§

ConfiguredGenerator
Binds a Generator to a concrete Generator::Config value so it can be erased to &dyn DynGenerator.
Orchestrator
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.