Version française
Home     About     Download     Resources     Contact us    

This site is updated infrequently. For up-to-date information, please visit the new OCaml website at

Browse thread
[ANN] atdgen
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: -- (:)
From: Martin Jambon <martinj@m...>
Subject: [ANN] atdgen
Hi list,

It is my pleasure to announce atdgen, a program for deriving OCaml serializers
and deserializers from type definitions.  The supported serialization formats
are JSON and a new binary format called biniou.

The main URL for atdgen is

Four distinct source packages were created:

- biniou:  a new binary format designed for full extensibility
- yojson:  a new library for the JSON format
- atd:  "Adjustable Type Definitions", a syntax for type definitions
- atdgen:  OCaml code generator

All four packages are distributed under the terms of a BSD license.
MyLife holds the copyright for atd and atdgen while I hold the copyright for
biniou and yojson.

Multiple ideas have motivated this work.  They are explained in the following

A standalone example using atdgen is given in the source distribution and is
accessible at:

Package details:

  Author:  Martin Jambon
  Version:  1.0.1
  Kind:  code generator
  Godi package: yes

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.

  Author:  Martin Jambon
  Version:  0.9.2
  Development status:  stable
  Kind:  library
  Godi package: yes

ATD stands for Adjustable Type Definitions.  It is a type definition
language designed to accommodate a variety of programming languages and data
formats by the means of target-specific annotations.  It supports sum
types, parametrized types and inheritance.  The library provides a parser
and other tools useful for manipulating ATD type definitions.  The
reference manual gives a complete description of the syntax.

  Author:  Martin Jambon
  Version:  0.9.1
  Development status:  stable
  Kind:  library
  Godi package: yes

Biniou is a binary data format designed for speed, safety, ease of use and
backward compatibility as protocols evolve.  Biniou is vastly equivalent to
JSON in terms of functionality but allows implementations about 4 times as
fast (see godi-yojson for comparison), with 25-35% space savings.  Biniou
data can be decoded into human-readable form without knowledge of type
definitions (except for field and variant names which are represented by
31-bit hashes).

  Author:  Martin Jambon
  Version:  0.8.1
  Development status:  stable
  Kind:  library
  Godi package: yes

Yojson is an optimized parsing and printing library for the JSON format.
It addresses a few shortcomings of json-wheel including 3x speed
improvement, polymorphic variants and optional syntax for tuples and