Expand description
Code generation engine for Gize.
Two responsibilities:
- Turn
gize_corespecs into file contents (viagize_templates). - Write those files safely — never clobbering user code without
--force, and supporting--dry-run(ADR-012).
Re-exports§
pub use plan::FileOp;pub use plan::OpKind;pub use plan::Plan;pub use registry::Edit;pub use registry::register_module;pub use writer::Options;pub use writer::Report;pub use writer::Writer;
Modules§
- plan
- A
Planis the set of file operations a generator wants to perform. Building the plan is pure (no I/O), which makes generators easy to test and makes--dry-runtrivial: we simply render the plan instead of applying it. - registry
- Idempotent edits to “registry” files — the ones
gize make appmust update in place rather than create:src/app/mod.rs(module + route wiring). - scaffold
- High-level generators. Each returns a pure
Plan; applying it is the [Writer]’s job. This separation keeps generation testable and makes--dry-runfree. - writer
- Applies a
Planto the filesystem, honouring the Gize safety model (ADR-012): never overwrite an existing file unlessforceis set, and write nothing at all whendry_runis set.