There are two different ways of building the OCaml bindings.
For packaging the hacl-star opam package the bindings can be built standalone.
./opam.sh cd opam
First we need to get the HACL C code, build it, and put it where the Makefile
expects the result.
opam.sh script puts everything in the right place within the
In the directory we can now build/install the opam package(s)
opam install . --verbose --with-test --yes
Documentation can be built with
dune build @doc --only-packages=hacl-star
⚠️ The dev mode is not working right now
When working on the library
mach offers a convenient way of building the C
library and the ocaml bindings through
mach using the
./mach build -l ocaml
This build the C library, copies the result into the
ocaml directory, and then
builds the OCaml bindings on top.
Tests can be called through mach as well
./mach test -l ocaml.