Filesystem structure for Ocaml project

Hello,

Is there a standard filesystem structure for distributing Ocaml projects (like a Filesystem Hierarchy Standard (FHS), for example)?

What I’ve seen so far on projects @github for example, is that the answer depends on which building way a developer of the project chooses (for packaging with OPAM for example, the directories would follow http://opam.ocaml.org/doc/Manual.html#files). A common way to do this distribution+compilation task (I’ve found) is OPAM+Dune (for which there’s a starter kit https://github.com/mjambon/dune-starter, but has few hints on file structure). Also have seen OPAM+Oasis/Ocamlmakefile/Omake etc… also without OPAM for smaller applications with basic building tools such as ocamlbuild or custom makefiles with ocamlc/ocamlopt. So, basically I’ve found large variations and was wondering if you could point to a more concrete reference, in particular I’d be interested on having the project available as a Debian package.

thanks!

1 Like

I think the general answer is that there isn’t, but that people tend to cluster around the sorts of conventions that are used in most compiled languages, with a top level directory containing README files, build system files, etc., and subdirectories for sources, examples, documentation, etc.