ogen is a generator of OCaml source of build configuration file.
The configuration file will generate dune configuration file.
Create an opam project file, execute the following command.
ogen opam my_package
By default, an opam file and Makefile are generated.
ls -a
my_package.opam
Makefile
You can use the lib command to generate a build configuration file for the library.
In the example below, we create a dune file named package_xyz in lib/xyz.
ogen lib package_xyz -p package.xyz -o lib/xyz
(library
(name package_xyz)
(public_name package.xyz)
)
You can generate modules using the mod command.
The following example creates a module file named example in lib/xyz.
ogen mod -o lib/xyz example
You can install using opam.
The compiler version of OCaml must be 4.09.0 or higher.
opam switch create 4.09.0
opam pin add ogen https://github.com/holyshared/ogen.git
Install and build the required dependent libraries.
opam install -y dune sexplib sexp_pretty cmdliner ppx_jane ppxlib mustache
make build
The test only executes the test command.
opam install -y dune sexplib sexp_pretty cmdliner ppx_jane ppxlib mustache
make test