package ocamlformat-rpc-lib

  1. Overview
  2. Docs
Auto-formatter for OCaml code (RPC mode)

Install

Dune Dependency

Authors

Maintainers

Sources

ocamlformat-0.27.0.tbz
sha256=ddbf484c076d08f99400ee84b790ec231f5c8fcbd5d3324a6400d5388e846d15
sha512=4d2a8965a7b7ad45f8f4e76c01cf38bfa68462b07dfa7bdb2db23bd3e3017b214e6780f036679fa8595dde4167a01d957e3af8837274320449014e306773f917

doc/ocamlformat-rpc-lib/Ocamlformat_rpc_lib/index.html

Module Ocamlformat_rpc_libSource

OCamlformat RPC API.

This module defines the commands exchanged between the server and the client, and the way to build RPC clients.

The whole API is functorized over an IO module defining the blocking interface for reading and writing the data.

After you decided on the IO implementation, the Ocamlformat_rpc_lib.Make API can then be instantiated:

  module RPC = Ocamlformat_rpc_lib.Make (IO)
Sourcemodule Protocol : sig ... end
Sourcetype format_args = Protocol.format_args
Sourceval empty_args : format_args
Sourcemodule Version = Protocol.Version
Sourcemodule type IO = sig ... end

Defines the blocking interface for reading and writing to Cohttp streams

Sourcemodule Make (IO : IO) : sig ... end

For a basic working example, see: test/rpc/rpc_test.ml.

Disclaimer:

The ocamlformat-rpc-lib API is versioned to offer some basic backwards compatibility. Note that this guarantee is "best effort", meaning the authors will try to minimize the changes over time and preserve the original behavior or versioned clients as much as possible. However structural changes may happen.

OCaml

Innovation. Community. Security.