| Crates.io | amalgam-codegen |
| lib.rs | amalgam-codegen |
| version | 0.6.4 |
| created_at | 2025-08-28 10:47:38.757878+00 |
| updated_at | 2025-09-01 23:46:41.880463+00 |
| description | Code generators for Nickel and Go for amalgam |
| homepage | https://github.com/seryl/amalgam |
| repository | https://github.com/seryl/amalgam |
| max_upload_size | |
| id | 1814001 |
| size | 84,509 |
Code generation library for amalgam, producing Nickel configurations and Go structs from intermediate representation.
amalgam-codegen takes the unified type system from amalgam-core and generates idiomatic code for target languages.
use amalgam_codegen::{NickelGenerator, GoGenerator};
use amalgam_core::Schema;
// Generate Nickel configuration
let schema = Schema::from_openapi("api.yaml")?;
let nickel_code = NickelGenerator::new()
.with_imports(true)
.generate(&schema)?;
// Generate Go structs
let go_code = GoGenerator::new()
.with_json_tags(true)
.generate(&schema)?;