Support for the dune build system
=================================

**NOTE:** in case of problem with the dune build, you can ask @lepigre or
@Blaisorblade for help.

The library can be built using dune by running `dune build`. Note that `dune`
needs to be installed separately with `opam install dune`, as it is currently
not part of the dependencies of the project.

Useful links:
- [dune documentation](https://dune.readthedocs.io)
- [coq zulip channel](https://rocq-prover.zulipchat.com/#narrow/channel/240550-Dune-devs-.26-users)


Editor support
--------------

Editors relying on `_RocqProject` files for their configuration are supported.
Suitable `_RocqProject` files are generated by `dune build`. Note that you must
invoke `dune` manually to make sure that the dependencies of the file you are
stepping through are up-to-date. To build a single file, you can use, e.g.,
`dune build iris/prelude/options.vo`. To build only the `iris` folder, you can
do `dune build iris`.

Alternatively, you can configure your editor to invoke `dune rocq top` instead
of `rocq repl`, but that is non-trivial for most editors.

#### Example setup with `stdpp` in the same workspace

To build both `iris` and `stdpp` together as part of the same workspace, you
can use the following setup steps.
```sh
mkdir workspace; cd workspace
git clone git-rts@gitlab.mpi-sws.org:iris/stdpp.git
git clone git-rts@gitlab.mpi-sws.org:iris/iris.git
echo "(lang dune 3.21)" > dune-workspace
```
The above is enough to be able to build everything (excepts tests, which are
not supported), and to step through files in both `stdpp` and `iris`.
