The goal of this PR is to streamline the code generation for ocaml-protoc and
cleanup the code. This would help me add new code generation plugins[^1] and also
reduce the sprawl of files produced by ocaml-protoc.
This is very much breaking:
options are now long (--pb and --pp instead of -pb and -pp)
all code for a .proto now lives in a single .ml/.mli file
In addition, the compiler lib can be directly used to generate code from a
.proto, giving it a list of plugins, without requiring Cmdline.t.
[^1]: my plans are: expose mutable records (or have an option to directly make all records mutable in the first place); and codegen for services
The goal of this PR is to streamline the code generation for
ocaml-protoc
and cleanup the code. This would help me add new code generation plugins[^1] and also reduce the sprawl of files produced byocaml-protoc
.This is very much breaking:
--pb
and--pp
instead of-pb
and-pp
)In addition, the compiler lib can be directly used to generate code from a .proto, giving it a list of plugins, without requiring
Cmdline.t
.[^1]: my plans are: expose mutable records (or have an option to directly make all records mutable in the first place); and codegen for services