/
opam
56 lines (50 loc) · 1.52 KB
/
opam
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
opam-version: "2.0"
maintainer: "thomas@gazagnaire.org"
authors: "Thomas Gazagnaire, Jon Ludlam"
homepage: "https://github.com/mirage/ocaml-rpc"
bug-reports: "https://github.com/mirage/ocaml-rpc/issues"
dev-repo: "git+ssh://git@github.com/mirage/ocaml-rpc.git"
doc: "https://mirage.github.io/ocaml-rpc/ppx_deriving_rpc"
tags: [
"org:mirage"
"org:xapi-project"
]
build: [
["jbuilder" "build" "-p" name "-j" jobs]
["jbuilder" "runtest" "-p" name "-j" jobs] {with-test}
]
depends: [
"ocaml" {>= "4.03.0" & < "4.08.0"}
"jbuilder" {>= "1.0+beta7"}
"cppo" {build}
"rpclib" {= version}
"rresult"
"ppx_deriving" {< "5.0"}
"ppx_tools"
"ppxfind"
"rpclib-lwt" {with-test & = version}
"rpclib-async" {with-test & = version}
"lwt" {with-test & >= "3.0.0"}
"async" {with-test}
"alcotest" {with-test}
]
synopsis: "ppx extension for rpclib"
description: """
The library provides the `[@@deriving rpc]` ppx directly
generates the conversion functions.
```ocaml
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:
```ocaml
type t = { foo: int [@key "type"]; bar: int [@key "let"]; } [@@deriving rpc]
```"""
url {
src: "https://github.com/mirage/ocaml-rpc/archive/v5.9.0.tar.gz"
checksum: "md5=177db71621a7aa7a55cbea6c237eb6dc"
}