forked from ocaml/dune
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' into melange/non-melange-lib-error
* main: (54 commits) doc: how we write `to_dyn` and `equal` (ocaml#6621) test(cache): test output of man pages test: dune utop for (subdir ..) (ocaml#6629) refactor: improve style of utop rules (ocaml#6628) test: depend on utop (ocaml#6627) refactor(stdune): Add Appendable_list.cons (ocaml#6624) doc: tighten wording in README.md test: add a repro case for ocaml#6607 (ocaml#6612) doc: cleanup status badges in README.md (ocaml#6618) doc(README): rewrap paragraphs and cleanup links coq: more resilient config query fix: link time code gen (ocaml#6606) fix(melange): run melc ppx with merlin (ocaml#6476) feature(melange): add compile_flags (ocaml#6569) refactor: move `modules: Modules.t` from `Dune_package.Lib` to `Lib_info` (ocaml#6605) Set CLICOLOR_FORCE=0 (ocaml#6608) fix: declare deps for ccomp detection (ocaml#6610) refactor: assume Cmdliner.Arg.conv is abstract (ocaml#6609) refactor: gen_rules pattern matching (ocaml#6604) Add CI for MSVC using dkml-workflows (ocaml#6540) ...
- Loading branch information
Showing
115 changed files
with
7,631 additions
and
648 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -24,3 +24,7 @@ result | |
|
||
.DS_Store | ||
nix/profiles/ | ||
|
||
# dkml desktop CI | ||
/msys64 | ||
/.ci |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,35 +1,26 @@ | ||
Dune - A Composable Build System | ||
================================ | ||
|
||
Dune is a build system designed for OCaml/Reason projects only. It | ||
focuses on providing the user with a consistent experience and takes | ||
care of most low-level details of OCaml compilations. It's merely necessary | ||
to provide a description of your project, and Dune will | ||
do the rest. | ||
|
||
It implements a scheme that's inspired from the one used inside Jane | ||
Street and adapted to the open source world. It has matured over a | ||
long time and is used daily by hundreds of developers, meaning | ||
it's highly tested and productive. | ||
|
||
Dune comes with a [manual][manual]. If you want to get started | ||
without reading too much, look at the [quick start | ||
guide][quick-start] or watch [this introduction video][video]. | ||
|
||
The [example][example] directory contains examples of projects using | ||
dune. | ||
|
||
[](https://github.com/ocaml/dune/actions/workflows/workflow.yml) | ||
[![AppVeyor status][appveyor-img]][appveyor] | ||
[![Main workflow][workflow-badge]][workflow] | ||
[![Release][release-img]][release] | ||
|
||
Dune is a build system for OCaml. It provides a consistent experience and takes | ||
care of the low-level details of OCaml compilation. You need only to provide a | ||
description of your project, and Dune will do the rest. | ||
|
||
Dune implements a scheme that's inspired from the one used inside Jane Street | ||
and adapted to the open source world. It has matured over a long time and is | ||
used daily by hundreds of developers, meaning it's highly tested and productive. | ||
|
||
Dune comes with a [manual][manual]. If you want to get started without reading | ||
too much, look at the [quick start guide][quick-start] or watch [this | ||
introduction video][video]. | ||
|
||
The [example][example] directory contains examples of projects using Dune. | ||
|
||
[manual]: https://dune.readthedocs.io/en/latest/ | ||
[quick-start]: https://dune.readthedocs.io/en/latest/quick-start.html | ||
[example]: https://github.com/ocaml/dune/tree/master/example | ||
[appveyor]: https://ci.appveyor.com/project/diml/dune/branch/master | ||
[appveyor-img]: https://ci.appveyor.com/api/projects/status/rsxayce22e8f2jkp?svg=true | ||
[release]: https://github.com/ocaml/dune/releases | ||
[release-img]: https://img.shields.io/github/release/ocaml/dune.svg | ||
[merlin]: https://github.com/ocaml/merlin | ||
[opam]: https://opam.ocaml.org | ||
[issues]: https://github.com/ocaml/dune/issues | ||
|
@@ -39,76 +30,70 @@ dune. | |
Overview | ||
-------- | ||
|
||
Dune reads project metadata from `dune` files, which are either | ||
static files in a simple S-expression syntax or OCaml scripts. It uses | ||
this information to setup build rules, generate configuration files | ||
for development tools such as [Merlin][merlin], handle installation, | ||
etc. | ||
Dune reads project metadata from `dune` files, which are static files with a | ||
simple S-expression syntax. It uses this information to setup build rules, | ||
generate configuration files for development tools such as [Merlin][merlin], | ||
handle installation, etc. | ||
|
||
Dune itself is fast, has very low overhead, and supports parallel | ||
builds on all platforms. It has no system dependencies. OCaml is all you need | ||
to build Dune and packages using Dune. You don't need | ||
`make` or `bash`, as long as the packages themselves don't use `bash` | ||
explicitly. | ||
Dune itself is fast, has very little overhead, and supports parallel builds on | ||
all platforms. It has no system dependencies. OCaml is all you need to build | ||
Dune and packages using Dune. | ||
|
||
In particular, one can install OCaml on Windows with a binary installer | ||
and then use only the Windows Console to build Dune and packages | ||
using Dune. | ||
In particular, one can install OCaml on Windows with a binary installer and then | ||
use only the Windows Console to build Dune and packages using Dune. | ||
|
||
Strengths | ||
--------- | ||
|
||
### Composable | ||
|
||
Take *n* repositories that use Dune and arrange them in any way on the | ||
file system. The result is still a single repository that Dune | ||
knows how to build at once. | ||
Dune is composable, meaning that multiple Dune projects can be arranged | ||
together, leading to a single build that Dune knows how to execute. This allows | ||
for monorepos of projects. | ||
|
||
This make simultaneous development on multiple packages trivial. | ||
Dune makes simultaneous development on multiple packages a trivial task. | ||
|
||
### Gracefully Handles Multi-Package Repositories | ||
|
||
Dune knows how to handle repositories containing several | ||
packages. When building via [Opam][opam], it is able to correctly use | ||
libraries that were previously installed, even if they are already | ||
present in the source tree. | ||
Dune knows how to handle repositories containing several packages. When building | ||
via [opam][opam], it is able to correctly use libraries that were previously | ||
installed, even if they are already present in the source tree. | ||
|
||
The magic invocation is: | ||
|
||
```sh | ||
$ dune build --only-packages <package-name> @install | ||
``` | ||
|
||
### Building Against Several Configurations at Once | ||
|
||
Dune can build a given source code repository against | ||
several configurations simultaneously. This helps maintaining packages | ||
across several versions of OCaml, as you can test them all at once | ||
without hassle. | ||
Dune can build a given source code repository against several configurations | ||
simultaneously. This helps maintaining packages across several versions of | ||
OCaml, as you can test them all at once without hassle. | ||
|
||
In particular, this makes it easy to handle [cross-compilation](https://dune.readthedocs.io/en/latest/cross-compilation.html). | ||
In particular, this makes it easy to handle | ||
[cross-compilation][cross-compilation]. This feature requires [opam][opam]. | ||
|
||
This feature requires [Opam][opam]. | ||
[cross-compilation]: https://dune.readthedocs.io/en/latest/cross-compilation.html | ||
|
||
Requirements | ||
------------ | ||
|
||
Dune requires OCaml version 4.08.0 to build itself and can build OCaml | ||
projects using OCaml 4.02.3 or greater. | ||
Dune requires OCaml version 4.08.0 to build itself and can build OCaml projects | ||
using OCaml 4.02.3 or greater. | ||
|
||
Installation | ||
------------ | ||
|
||
We recommended installing Dune via the [Opam package manager][opam]: | ||
We recommended installing Dune via the [opam package manager][opam]: | ||
|
||
```sh | ||
$ opam install dune | ||
``` | ||
|
||
If you are new to Opam, make sure to run `eval $(opam config env)` to | ||
make `dune` available in your `PATH`. The `dune` binary is self-contained | ||
and relocatable, so you can safely copy it somewhere else to | ||
make it permanently available. | ||
If you are new to opam, make sure to run `eval $(opam config env)` to make | ||
`dune` available in your `PATH`. The `dune` binary is self-contained and | ||
relocatable, so you can safely copy it somewhere else to make it permanently | ||
available. | ||
|
||
You can also build it manually with: | ||
|
||
|
@@ -125,22 +110,21 @@ $ ./dune.exe build -p dune --profile dune-bootstrap | |
$ ./dune.exe install dune | ||
``` | ||
|
||
The first command builds the `dune.exe` binary. The second builds the | ||
additional files installed by Dune, such as the *man* pages, and | ||
the last simply installs all of that on the system. | ||
The first command builds the `dune.exe` binary. The second builds the additional | ||
files installed by Dune, such as the *man* pages, and the last simply installs | ||
all of that on the system. | ||
|
||
**Please note**: unless you ran the optional `./configure` script, you can | ||
simply copy `dune.exe` anywhere and it will just work. `dune` is | ||
fully relocatable and discovers its environment at runtime rather than | ||
hard-coding it at compilation time. | ||
simply copy `dune.exe` anywhere and it will just work. `dune` is fully | ||
relocatable and discovers its environment at runtime rather than hard-coding it | ||
at compilation time. | ||
|
||
Support | ||
------- | ||
|
||
If you have questions about Dune, you can send an email to | ||
[email protected] or [open a ticket on GitHub][issues]. | ||
|
||
|
||
Migration from Jbuilder | ||
----------------------- | ||
|
||
|
@@ -150,7 +134,11 @@ described in the [manual](http://dune.readthedocs.io/en/latest/migration.html). | |
Status | ||
------ | ||
|
||
Dune is fairly stable and used by the majority of packages on | ||
Opam. Note that Dune retains backward compatibility with Jbuilder, and | ||
in particular, existing Jbuilder projects will continue to be buildable | ||
with Dune. | ||
Dune is fairly stable and used by the majority of packages on opam. Note that | ||
Dune retains backward compatibility with Jbuilder, and in particular, existing | ||
Jbuilder projects will continue to be buildable with Dune. | ||
|
||
[workflow-badge]: https://github.com/ocaml/dune/actions/workflows/workflow.yml/badge.svg | ||
[workflow]: https://github.com/ocaml/dune/actions/workflows/workflow.yml | ||
[release]: https://github.com/ocaml/dune/releases | ||
[release-img]: https://img.shields.io/github/release/ocaml/dune.svg |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.