Expand description
Platform-independent IaC code generation core library.
Defines the IR types (IacType, IacAttribute, IacResource),
the Backend trait, the resolver functions, and shared test fixtures
that all *-forge backends consume.
Re-exports§
pub use backend::ArtifactKind;pub use backend::Backend;pub use backend::GeneratedArtifact;pub use backend::NamingConvention;pub use error::IacForgeError;pub use ir::AuthInfo;pub use ir::CrudInfo;pub use ir::HasAttributes;pub use ir::IacAction;pub use ir::IacAttribute;pub use ir::IacDataSource;pub use ir::IacProvider;pub use ir::IacResource;pub use ir::IacType;pub use ir::IdentityInfo;pub use resolve::resolve_action;pub use resolve::resolve_data_source;pub use resolve::resolve_provider;pub use resolve::resolve_resource;pub use spec::ActionMapping;pub use spec::AuthConfig;pub use spec::ConfigLoader;pub use spec::CrudMapping;pub use spec::DataSourceMeta;pub use spec::DataSourceSpec;pub use spec::FieldOverride;pub use spec::IdentityConfig;pub use spec::ProviderDefaults;pub use spec::ProviderMeta;pub use spec::ProviderSpec;pub use spec::ReadMapping;pub use spec::ResourceMeta;pub use spec::ResourceSpec;pub use testing::TestAttributeBuilder;pub use testing::test_data_source;pub use testing::test_provider;pub use testing::test_resource;pub use testing::test_resource_with_type;pub use type_map::apply_enum_constraint;pub use type_map::is_valid_type_override;pub use type_map::openapi_to_iac;
Modules§
- backend
- Backend trait and generated artifact types.
- error
- Error types for the iac-forge pipeline.
- fleet
- Fleet: named collection of IacResource values with composite hashing. Fleet-level IR aggregation and hashing.
- hex
- Hex encode/decode helpers shared across sexpr consumers. Hex encoding + decoding helpers.
- ir
- Platform-independent intermediate representation (IR).
- morphism
- Structure-preserving maps with composable proofs. Structure-preserving maps between types — morphisms in the categorical sense.
- naming
- Naming convention helpers (snake_case, camelCase, etc.). Naming conventions — delegated to meimei.
- nix
- Sexpr ↔ Nix AST bridge (NixValue + round-trip to SExpr). Sexpr ↔ Nix bridge.
- nix_
backend - Nix backend:
Backendimpl rendering IR as Nix attribute sets. Nix backend — emitsIacResourceas a Nix attribute set. - nix_
transform - Nix-powered IR transforms (external evaluator: nix-instantiate or sui). Nix-powered IR transforms.
- pipeline
- Pipelines of representation with promotions and mutations + Trace. Typed representation pipelines: promotions and mutations with traceable provenance.
- policy
- Policy-as-code over sexpr patterns. Policy-as-code over sexpr patterns.
- remediation
- Remediation harness: bounded transform application with invariants. Remediation harness — bounded, auditable transform application.
- render_
cache - Content-addressed cache over backend rendering. Content-addressed render cache.
- resolve
- Resolver: spec +
OpenAPI→ IR. - sdk_
naming - Per-language SDK naming conventions for emitted backends. Per-language SDK naming conventions for emitted backends.
- sexpr
- Canonical s-expression interchange for IR values. Canonical s-expression interchange for the platform-independent IR.
- sexpr_
diff - Semantic diff over sexpr trees. Semantic diff over sexpr trees.
- spec
- TOML spec types for resources, data sources, and providers.
- testing
- Shared test fixtures for backend tests. Shared test fixtures for iac-forge backends.
- transform
- User-extensible IR transforms with a minimal s-expr script surface. User-extensible IR transforms.
- type_
map - Type mapping from
OpenAPI/ takumi types toIacType.
Functions§
- strip_
provider_ prefix - Strip a common provider prefix from a resource name.
- to_
camel_ case - Convert a name to
camelCase. - to_
kebab_ case - Convert a name to
kebab-case(underscores become hyphens). - to_
pascal_ case - Convert a hyphenated or
snake_casename toPascalCase. - to_
snake_ case - Convert a name to
snake_case(hyphens become underscores).