package bare_encoding

  1. Overview
  2. Docs
BARE encoding, see https://baremessages.org/

Install

Dune Dependency

Authors

Maintainers

Sources

v0.3.tar.gz
md5=6ef8ffc8de96ae13250bff503e26104b
sha512=3df1a909154084bb7f2bd6dcbb80b408777397ab7dc240eaba257fc0414f408c8d9a52b89fbace69a3d1ca75fea332deda084bc09d18ea96e435073b6b351ca3

Description

Tags

encoding binary bare

Published: 16 Feb 2022

README

Bare-OCaml

A simple code generator and runtime library for BARE following the spec.

  • License: MIT.

  • online documentation: https://c-cube.github.io/bare-ocaml/

Features

  • runtime library named Bare, with entrypoints for encoding/decoding all the base types over Buffer.t and bytes respectively.

  • code generator for producing OCaml code with type declarations and encoder/decoder functions.

    • the code generator can handle mutually recursive types and out-of-order declarations, by sorting them first. Each type gets its own toplevel module; for example type foo int will become:

      module Int = struct
        type t = int64
      
        let decode = …
        let encode = …
      end
      
    • pretty-printers can be generated using the --pp option

    • the generated code can be made dependency-free by using --standalone. In that case, the code for the Bare module will be inserted at the beginning of the generated code.

  • basic testing (needs to be improved when test vectors are published)

  • basic vim syntax files in data/vim/

Dependencies (2)

  1. ocaml >= "4.08"
  2. dune >= "2.8"

Dev Dependencies (2)

  1. odoc with-doc
  2. qtest with-test & >= "2.10"

Used by

None

Conflicts

None