(lang dune 1.11)
(using menhir 1.0)

(name atd)
(license MIT)

(maintainers "Rudi Grinberg <me@rgrinberg.com>")

(authors
 "Martin Jambon <martin@mjambon.com>"
 "David Sheets <sheets@alum.mit.edu>"
 "Rudi Grinberg <me@rgrinberg.com>"
 "Ivan Jager <aij+git@mrph.org>"
 "Jeff Meister <nanaki@gmail.com>"
 "Carmelo Piccione <carmelo.piccione@gmail.com>"
 "Raman Varabets <roman.vorobets@gmail.com>"
 "Mathieu Baudet <mathieubaudet@fb.com>"
 "Rauan Mayemir <rauan@mayemir.io>"
 "Louis Roché <louis@louisroche.net>"
 "Brendan Long <self@brendanlong.com>"
 "Christophe Troestler <christophe.Troestler@umons.ac.be>"
 "Vincent Bernardoff <vb@luminar.eu.org>"
 "haoyang <haoyang@esper.co>")

(source (github ahrefs/atd))

(generate_opam_files true)

(package
 (name atd)
 (depends
  (ocaml (>= 4.02))
  (dune (>= 1.11))
  menhir
  easy-format
  re)
 (synopsis "Parser for the ATD data format description language")
 (description "\
ATD is the OCaml library providing a parser for the ATD language and various
utilities. ATD stands for Adjustable Type Definitions in reference to its main
property of supporting annotations that allow a good fit with a variety of data
formats. "))

(package
 (name atdgen)
 (depends
  (ocaml (>= 4.02))
  (dune (>= 1.11))
  (atd (>= 2.0.0))
  (atdgen-runtime (>= 2.0.0))
  (biniou (>= 1.0.6))
  (yojson (>= 1.7.0)))
 (synopsis "Generates efficient JSON serializers, deserializers and validators")
 (description "\
Atdgen is a command-line program that takes as input type definitions in the ATD
syntax and produces OCaml code suitable for data serialization and
deserialization.
Two data formats are currently supported, these are biniou and JSON.
Atdgen-biniou and Atdgen-json will refer to Atdgen used in one context or the
other.
Atdgen was designed with efficiency and durability in mind. Software authors are
encouraged to use Atdgen directly and to write tools that may reuse part of
Atdgen’s source code."))

(package
 (name atdgen-runtime)
 (synopsis "Runtime library for code generated by atdgen")
 (description "\
This package should be used only in conjunction with the stdgen code
generator")
 (depends
  (ocaml (>= 4.02))
  (dune (>= 1.11))
  (yojson (>= 1.7.0))
  (biniou (>= 1.0.6))
  re))

(package
 (name atdj)
 (synopsis "Java code generation for ATD")
 (description "\
Atdj is a program that generates a Java interface from type definitions. In
particular, given a set of ATD type definitions, this tool generates a set of
Java classes representing those types with built-in JSON serializers and
deserializers

The primary benefits of using the generated interface, over manually
manipulating JSON strings from within Java, are safety and ease of use.
Specifically, the generated interface offers the following features:

- JSON strings are automatically checked for correctness with respect to the ATD
specification.

- Details such as optional fields and their associated default values are
automatically handled")
 (depends
  (ocaml (>= 4.02))
  (dune (>= 1.11))
  (atd (>= 2.0.0))
  re))

(package
 (name atds)
 (synopsis "ATD Code generator for Scala")
 (description "ATD Code generator for Scala")
 (depends
  (ocaml (>= 4.02))
  (dune (>= 1.11))
  (atd (>= 2.0.0))
  re))

(package
 (name atdgen-codec-runtime)
 (synopsis "Runtime for atdgen generated bucklescript converters")
 (description "\
This library contains the types that are used by atdgen's
bucklescript backend")
 (depends
  (ocaml (>= 4.02))))
