Closed Leonidas-from-XIV closed 4 years ago
I guess I could just allow parsing of the file but not generate anything.
:+1:
I'm looking to try out: https://github.com/etcd-io/etcd/blob/master/etcdserver/etcdserverpb/rpc.proto -- it uses the service
syntax quite heavily. I'm not sure what the expected output would be here, but would be nice. Thanks!
Since that file only contains the service definition. I think it might be best to rather run ocaml-protoc on each of the included file to generate the type.
ocaml-protoc is solely focusing on the serialization part not the IPC part.
could service files produce a functor that is parametrized by, say, a state type, and containing a state machine for query/replies? Then the user can instantiate that with the appropriate transport (such as http2, but not limited to that)?
I am not sure what it would compile to, but I think it would be nice if the parser at least processed it and showed syntax errors and then exited with a (disableable) error. Currently I have to comment out these sections from the
.proto
files, which is not terrible but it would be nice if I could just use the proto files as-is.