package bare_encoding

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

Install

Dune Dependency

Authors

Maintainers

Sources

v0.1.1.tar.gz
md5=c719df0092afbc5f75784ab359732ca0
sha512=6447f7241c75e749f201521b3599314afaad02a0ef3a81a2f689cda556115b2c8a79b871a5ae8500b75a70b0e9437193f6d418a9b30d8ef30cf2f29774005d0c

Description

Tags

encoding binary bare

Published: 08 Nov 2021

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

OCaml

Innovation. Community. Security.