package bare_encoding
Install
Dune Dependency
Authors
Maintainers
Sources
md5=6ef8ffc8de96ae13250bff503e26104b
sha512=3df1a909154084bb7f2bd6dcbb80b408777397ab7dc240eaba257fc0414f408c8d9a52b89fbace69a3d1ca75fea332deda084bc09d18ea96e435073b6b351ca3
Description
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 overBuffer.t
andbytes
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
optionthe generated code can be made dependency-free by using
--standalone
. In that case, the code for theBare
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/