A fast, composable build system for OCaml that handles low-level compilation details with a simple project description.
Dune is a build system designed specifically for OCaml that automates the complexities of compilation. It reads project metadata from simple configuration files and handles build rules, tool configuration, and installation, allowing developers to focus on their code. Inspired by Jane Street's internal build system and adapted for open source, it is mature, widely tested, and used daily by hundreds of developers.
OCaml developers who need a reliable, fast, and composable build system for managing single or multi-package projects, including those working in monorepos or requiring cross-compilation.
Developers choose Dune for its simplicity, performance, and composability, which abstracts away low-level compilation details while supporting parallel builds, multi-configuration setups, and self-contained, relocatable binaries with no system dependencies beyond OCaml.
A composable build system for OCaml.
Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.
Dune's composable build system allows multiple projects to be combined into a single build, simplifying development on multiple packages and enabling monorepos as highlighted in the README.
It correctly handles multi-package repositories by using installed libraries via opam, even when they exist in the source tree, avoiding version conflicts through commands like 'dune build --only-packages'.
Dune can build against several configurations at once, making it easy to maintain packages across different OCaml versions and handle cross-compilation, as noted in the multi-configuration building section.
With minimal overhead, parallel builds on all platforms, and no system dependencies beyond OCaml, Dune is highly performant and portable, even on Windows via binary installers.
The dune files use a simple S-expression syntax, which might have a learning curve for developers accustomed to JSON, YAML, or other configuration formats, requiring adaptation.
Advanced features like multi-configuration building and seamless library handling require opam integration, limiting flexibility for teams not using this package manager.
Dune is designed specifically for OCaml and cannot natively handle build processes for projects involving other languages, necessitating additional tooling for polyglot setups.