Skip to main content

generate_go

Function generate_go 

Source
pub fn generate_go(schema: &Schema) -> Result<String>
Expand description

Compile a schema to a Go package of typed structs with ToVerit / <Type>FromVerit over the stdlib-only veritate port. A small reflect runtime maps each struct to/from the port’s Struct value form, so every schema the dynamic reader supports is supported here too. Optional fields are pointers (nil = absent). The embedded canonical schema + 128-bit id are the cross-language contract.