bare_encoding

BARE encoding, see https://baremessages.org/
README

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/

Install
Published
16 Feb 2022
Maintainers
Sources
v0.3.tar.gz
md5=6ef8ffc8de96ae13250bff503e26104b
sha512=3df1a909154084bb7f2bd6dcbb80b408777397ab7dc240eaba257fc0414f408c8d9a52b89fbace69a3d1ca75fea332deda084bc09d18ea96e435073b6b351ca3
Dependencies
odoc
with-doc
qtest
with-test & >= "2.10"
ocaml
>= "4.08"
dune
>= "2.8"
Reverse Dependencies