Expose a RPC interface through a new binary ocamlformat-rpc and a new library ocamlformat-rpc-lib#1586
Expose a RPC interface through a new binary ocamlformat-rpc and a new library ocamlformat-rpc-lib#1586gpetiot merged 9 commits intoocaml-ppx:masterfrom gpetiot:rpc
Conversation
That seems like a good idea. Is the |
Yes I guess we can release this lib as a new |
|
This PR fulfills the needs of ocaml-lsp (@voodoos) and mdx (@NathanReb), @emillon @Julow do you have some comments on it before I release it for 0.17.1 ? |
|
|
… library ocamlformat-rpc-lib
cc @emillon @voodoos @rgrinberg
The current state of this PR is:
We define a new binary
ocamlformat-rpcthat starts a listening loop, accepting the following commands from stdin:So far the version is not part of the protocol, but we can imagine that the client specifies it when initiating the connection with the server, and the server could return ACK/NACK or propose another version.