ppx_deriving_rpcversion

ppx extension for rpclib

The library provides the [@@deriving rpc] ppx directly generates the conversion functions.

type t = ... [@@deriving rpc]

will give two functions:

  • A function to convert values of type t to values of type Rpc.t : val rpc_of_t : t -> Rpc.t

  • A function to convert values of type Rpc.t to values of type t : val t_of_rpc : Rpc.t -> (t,string) Result.result

It also supports the @key annotations for having different field names:

type t = { foo: int [@key "type"]; bar: int [@key "let"]; } [@@deriving rpc]
Tags org:mirage org:xapi-project
AuthorThomas Gazagnaire, Jon Ludlam
Published
Homepagehttps://github.com/mirage/ocaml-rpc
Issue Trackerhttps://github.com/mirage/ocaml-rpc/issues
Maintainerthomas@gazagnaire.org
Dependencies
Source [http] https://github.com/mirage/ocaml-rpc/archive/v6.0.0.tar.gz
sha256=ec4ba5bfbdbc11f0d3292f8e08af28354da1a6812243263136e7c7357d6b1935
md5=9d10fc413a559e1d8aa380a8b145736f
Edithttps://github.com/ocaml/opam-repository/tree/master/packages/ppx_deriving_rpc/ppx_deriving_rpc.6.0.0/opam
Required by