Source

ocaml-cstruct-codegen / lib / cstruct_codegen.mli

(* abstract types: *)

type cfielddef;
type cstructdef;

(* how to define structure: *)

value cstruct : string -> list cfielddef -> cstructdef;

(* how to define structure's fields: *)

value int8   : string -> cfielddef;
value uint8  : string -> cfielddef;
value int16  : string -> cfielddef;
value uint16 : string -> cfielddef;
value int64  : string -> cfielddef;

(* how to write an .ml-file with generated code: *)

value codegen : string -> list cstructdef -> unit;