bril library, which lives in the
bril-ocaml directory, provides an OCaml interface and parser for Bril’s JSON files.
To build the library, you first need to install OCaml.
Then, install the dependencies with
opam install core yojson.
To install the bril-ocaml library:
git clone https://github.com/sampsyo/bril path/to/my/bril
opam pin add -k path bril path/to/brill/bril-ocaml
opam install bril
That’s it! You can include it in your Dune files as
bril, like any other OCaml library.
The interface for the library can be found in
bril.mli—good starting points are
A small code example for the library lives in the
If you wish to make changes to the bril OCaml library, simply hack on the git clone.
When you are done, simply reinstall the package with
opam reinstall bril. Restart the build of your
local project to pick up changes made to bril-ocaml.