package dune-rpc

  1. Overview
  2. Docs

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:

  • Add optional arguments to functions
  • Add new fields to records
  • New variant constructors that will not cause runtime errors in existing user programs.

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.

  • alert unstable The API of this library is not stable and may change without notice.
module V1 : sig ... end