dune/README.org

77 lines
2.8 KiB
Org Mode
Raw Normal View History

2016-12-02 13:54:32 +00:00
* A fast, portable and opinionated build system
Jbuilder is a build system that was designed to simplify the release
of Jane Street packages. It should however cover the needs of a wide
2017-02-21 15:09:26 +00:00
range of OCaml packages. It reads metadata from =jbuild= files
2016-12-02 13:54:32 +00:00
following a very simple s-expression syntax.
2017-02-21 15:09:26 +00:00
Jbuilder comes with a [[./doc/manual.org][manual]]. If you want to get started without
reading too much, look at the [[./doc/quick-start.org][quick start guide]].
2016-12-02 13:54:32 +00:00
** Overview
Jbuilder is fast, has very low-overhead and supports parallel builds
on all platforms. It has no system dependencies: all you need to build
jbuilder and packages using jbuilder is OCaml. You don't need
=make= or =bash= as long as the packages themselves don't use =bash=
explicitely.
This hasn't been tested yet, but in theory one should be able to
install OCaml on Windows with a binary installer and then use only the
Windows Console to build Jbuilder and packages using Jbuilder.
** Features
*** Multi-package development
Jbuilder supports multi-package development by simply dropping
multiple repositories into the same directory. You just need to create
an empty file =jbuild-workspace= to mark the root of your workspace.
*** Multi-context builds
Jbuilders supports multi-context builds, such as building against
several opam roots/switches simultaneously. This helps maintaining
packages across several versions of OCaml and gives cross-compilation
for free; when you need a program to run on the host, you simply use
the one from the corresponding host context.
*** Defining several packages in one repository
Jbuilder supports building several packages from the same
repository. When building via opam, it is able to correctly use
already installed libraries instead of the one present in the tarball.
The magic invocation is =jbuilder build-package <package>= which starts
by filtering out everything that is part of another opam package.
*** Develop with jenga, release with jbuilder
Jbuilder is intended as a fast release build system. Eventually we'll
have jenga rules that are able to understand the jbuilder rules. This
means that one will be able to use jenga as a confortable development
build system that knows how to do polling builds or talk to emacs
and use jbuilder to release packages with as few requirements as
possible.
** Status
2017-02-22 15:25:34 +00:00
Jbuilder is still in its infancy and in active development. The CLI is
still basic and not well documented.
2016-12-02 13:54:32 +00:00
2017-02-22 15:25:34 +00:00
However, most of the core functionality is already implemented. What
you can do right now is write some jbuild files, and invoke jbuilder
at the root of your project as follows:
2016-12-02 13:54:32 +00:00
#+begin_src
$ jbuilder build <package>.install
2016-12-02 13:54:32 +00:00
#+end_src
Building the =.install= file will build all the things that need to be
installed.
** Roadmap
2017-02-22 15:25:34 +00:00
See [[ROADMAP.org]] for the current plan. Help on any of these points is
welcome!