ppx_deriving_rpc
  1. Overview
  2. Docs
ppx extension for rpclib

Install

Authors

Maintainers

Sources

v5.9.0.tar.gz
md5=177db71621a7aa7a55cbea6c237eb6dc

Description

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

Published: 06 Aug 2018

Dependencies (8)

  1. ppxfind
  2. ppx_tools
  3. ppx_deriving < "5.0"
  4. rresult
  5. rpclib = version
  6. cppo build
  7. jbuilder >= "1.0+beta7"
  8. ocaml >= "4.03.0" & < "4.08.0"

Dev Dependencies (5)

  1. alcotest with-test
  2. async with-test
  3. lwt with-test & >= "3.0.0"
  4. rpclib-async with-test & = version
  5. rpclib-lwt with-test & = version

Used by (4)

  1. crc >= "2.1.0"
  2. rpc = "5.9.0"
  3. xapi-backtrace >= "0.7"
  4. xapi-rrd = "1.8.2"

Conflicts

None