amalgam-core
Core intermediate representation (IR) and type system for the amalgam configuration generator.
Overview
amalgam-core provides the foundational type system and intermediate representation used by all amalgam components to translate between different schema and configuration languages.
Features
- Unified Type System: Algebraic data types that can represent concepts from multiple languages
- Schema IR: Intermediate representation for schemas from OpenAPI, Kubernetes CRDs, Go types, etc.
- Type Mapping: Bidirectional mappings between different type systems
- Validation Rules: Contract and refinement type support
Usage
use ;
// Create a schema from various sources
let schema = new;
// Add types and constraints
schema.add_type
.with_constraint
.with_constraint;