Code generation
Once a schema is compiled to its Intermediate Representation, Comline can emit equivalent source code for a target language: the type definitions for structures and enums, and an interface per protocol. Because generation works from the IR, it can target several languages and several past versions of the same schema.
What Comline aims for
Many schema libraries generate just enough to move bytes — message types, and a thin service stub. Comline tries to carry more of the schema's information into the generated code: language-specific typing, the protocol surface as a real interface or trait so editors can complete and check against it, and enough detail that the generated code is pleasant to use directly rather than only as a "try it out" artifact.
Using it
comline generate is the command; Generating code is the
full guide, and comline.toml is where a
consumer sets the output location, layout and mode.
Today there are rust and typescript generators (both code mode); rust
also does lib mode. Library generation covers the
modes and dylib, which is still planned.