Module Dune_util.PersistentSource

Persistent values

This module allows to store values on disk so that they persist after Dune has exited and can be re-used by the next run of Dune.

Values are simply marshaled using the Marshal module and manually versioned. As such, it is important to remember to increase the version number when the type of persistent values changes.

In the future, we hope to introduce a better mechanism so that persistent values are automatically versioned.

Sourcemodule type Desc = sig ... end
Sourcemodule Make (D : Desc) : sig ... end

Create a pair of functions to write/read a persistent value to/from a file. D.name must be unique.