Ocamlrpcgen-style interfaces

One way to use orpc is as a direct replacement for ocamlrpcgen. In this mode (“simple” mode), instead of giving a protocol.x file as input, you give a protocol.mli file containing an OCaml signature consisting of type, exception, and value declarations (but no module type declarations). The protocol.mli file is just input to orpc (like protocol.x for ocamlrpcgen), and is not needed once the interface has been generated. See ModulesInterfaces, where in contrast the orpc input also directly defines types and signatures and is compiled into clients and servers.

The modules generated from a simple input are basically the same as the ones generated by ocamlrpcgen: Protocol_aux contains types, exceptions, and marshalling functions; Protocol_clnt contains synchronous and asynchronous client functions that take an Rpc_client.t as a first argument; and Protocol_srv contains synchronous and asynchronous bind functions that take implementations of all the functions in the interface as arguments.

See the simple and simple_async examples for more details.