vexil-codegen-go
Go code generation backend for the Vexil schema compiler.
Takes a CompiledSchema from vexil-lang and emits Go structs, enums, and encode/decode functions. Generated code depends on github.com/vexil-lang/vexil/packages/runtime-go for bit-level I/O.
Single file
use compile;
use generate;
let result = compile;
let compiled = result.compiled.expect;
let code: String = generate?;
Multi-file project
use ;
use GoBackend;
let project = compile_project?;
let files: = GoBackend.generate_project?;
// one .go file per schema + package-level organization
What gets generated
For each message: a Go struct with Pack/Unpack methods. For enums: typed constants with iota. For flags: a named integer type with bitwise helpers. For unions: an interface with per-variant concrete types. For @delta messages: a stateful encoder/decoder pair that transmits field-level deltas.
CLI usage
Wire compatibility
Generated Go produces byte-identical output to the Rust and TypeScript backends. This is verified by the compliance vector suite.
License
Licensed under either of MIT or Apache-2.0 at your option.