Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/c-cube/bare-ocaml
runtime library and code-generator for BARE (https://baremessages.org/)
https://github.com/c-cube/bare-ocaml
bare codec ocaml
Last synced: 3 months ago
JSON representation
runtime library and code-generator for BARE (https://baremessages.org/)
- Host: GitHub
- URL: https://github.com/c-cube/bare-ocaml
- Owner: c-cube
- Created: 2020-09-01T02:09:44.000Z (over 4 years ago)
- Default Branch: main
- Last Pushed: 2024-08-16T14:29:23.000Z (6 months ago)
- Last Synced: 2024-10-13T01:46:09.675Z (4 months ago)
- Topics: bare, codec, ocaml
- Language: OCaml
- Homepage: https://c-cube.github.io/bare-ocaml/
- Size: 758 KB
- Stars: 24
- Watchers: 3
- Forks: 2
- Open Issues: 5
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGES.md
Awesome Lists containing this project
README
# Bare-OCaml ![build](https://github.com/c-cube/bare/workflows/build/badge.svg)
A simple code generator and runtime library for [BARE](https://baremessages.org/)
following [the spec](https://datatracker.ietf.org/doc/draft-devault-bare/11/)- 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:```ocaml
module Int = struct
type t = int64let 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/`