Module Dune_rpc.V1Source

Implementation of the protocol used by dune rpc. Independent of IO and any specific rpc requests. The protocol described here is stable and is relied on by 3rd party clients.

The implementation is loosely modelled on jsonrpc. It defines the following concepts:

Session - An active rpc session

Request - A unique id with a call sent by a client. A server must respond to every request

Notification - A call send by a client. A server must not respond to a notification

It contains hooks that make it possible to use with any custom scheduler that uses fibers

The API in this version is versioned. When using this library, we expect that the module corresponding to a particular version is used exclusively.

While we guarantee stability of the API, we reserve the right to:

This means that you must refrain from re-exporting any values, constructing any records, using any module types as functor arguments, or make non exhaustive matches an error to guarantee compatibility.

Sourcemodule Id : sig ... end

Id's for requests, responses, sessions.

Sourcemodule Response : sig ... end
Sourcemodule Initialize : sig ... end
Sourcemodule Loc : sig ... end
Sourcemodule Path : sig ... end
Sourcemodule Ansi_color : sig ... end
Sourcemodule User_message : sig ... end
Sourcemodule Target : sig ... end
Sourcemodule Diagnostic : sig ... end
Sourcemodule Progress : sig ... end
Sourcemodule Job : sig ... end
Sourcemodule Sub : sig ... end
Sourcemodule Message : sig ... end
Sourcemodule Version_error : sig ... end

A Version_error is returned on the client-side when a request or notification is determined to be invalid due to version negotiation (no known method or no common version).

Sourcemodule Notification : sig ... end
Sourcemodule Request : sig ... end
Sourcemodule Client : sig ... end
Sourcemodule Where : sig ... end

represents the address where a dune rpc instance might be listening

Sourcemodule Registry : sig ... end

The registry is where all running instances of dune rpc are stored.