package encore

All checked builds pass
  1. Overview
  2. Docs
Library to generate encoder/decoder which ensure isomorphism

Install

dune-project
 Dependency

Authors

Maintainers

Sources

encore-0.8.1.tbz
sha256=aa0ea179205ce8e49f6fbbd9c448b8aeb2a1fa7c7e7df9ec09f56f855477c98d
sha512=1d45278af321026902554d929cf97820637bae9042bcea3dfb0b017993ca150685a1cc1c4febd10f83de214a382c50e398b365c35dce8e5add8e504f4a05dabb

Description

Encore is a little library to provide an interface to generate an angstrom decoder and an internal encoder from a shared description. The goal is to ensure a dual isomorphism between them.

Added to opam-repository:

README

Encore

serializer / deserializer

The goal of encore is to provide a way to express a format. From it, the user is able to make an angstrom's parser or a lavoisier's encoder. It wants to ensure isomorphism:

type v

let t : v Encore.t = ...
let decoder = Encore.to_angstrom t
let encoder = Encore.to_lavoisier t

let assert random_v =
  let str = Encore.Lavoisier.emit_string random_v encoder in
  let v'  = Angstrom.parse_string decoder str in
  assert (v = v')

How to install?

encore requires OCaml 4.07 and it is available with OPAM:

$ opam install encore

It can be compiled with js_of_ocaml.

Documentation

A documentation is available here to explain how to properly use encore. Some examples of encore exists into ocaml-git.

Inspirations

This project is inspired by the finale project which is focused on a pretty-printer at the end. Encore is close to provide a low-level encoder like faraday than a generator of a pretty-printer.

Dependencies (5)

  1. bigstringaf >= "0.5.0"
  2. fmt
  3. angstrom >= "0.14.0"
  4. dune >= "2.0.0"
  5. ocaml >= "4.07.0"

Dev Dependencies (1)

  1. alcotest with-test

Optional Dependencies

None

Used by (3)

  1. git >= "3.2.0"
  2. git-kv >= "0.2.0"
  3. spoke

Conflicts

None

Build status

Results of building encore with each compiler on check.ci.ocaml.org, run of against opam-repository 7cdc698. All results for this package.

Each result links to its build log. To keep crawlers from overloading the site, build logs require a GitHub sign-in (see ocurrent/opam-health-check). On your first log, GitHub asks you to “Authorize opam-health-check”, the OCurrent app that runs these checks; it sees only your public profile, not your repositories. The sign-in lasts 30 days.

Version OCaml 4.11 OCaml 4.14 OCaml 5.2 OCaml 5.4 OCaml 5.5
0.8.1 (this version) good good good good good
  • good Package successfully built
  • partial One of the dependencies failed to build
  • bad Package failed to build
  • n/a Package is not available in this environment
  • internal Internal failure