package jbuilder
Install
Dune Dependency
Authors
Maintainers
Sources
sha256=713c85a02f1dd78eef0c97940e155135878b4f317eda8d18aefdbbbd6431f951
md5=a7f63d68f717b1658f3685cfce058d0a
Description
jbuilder is a build system that was designed to simplify the release of Jane Street packages. It reads metadata from "jbuild" files following a very simple s-expression syntax.
jbuilder is fast, it has very low-overhead and support 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 or make or bash as long as the packages themselves don't use bash explicitely.
jbuilder supports multi-package development by simply dropping multiple repositories into the same directory.
It also 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.
Published: 19 Apr 2017
README
README.org
* JBUILDER - A composable build system for OCaml Jbuilder is a build system designed for OCaml projects only. It focuses on providing the user with a consistent experience and takes care of most of the low-level details of OCaml compilation. All you have to do is provide a description of your project and Jbuilder will do the rest. The scheme it implements is 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 hundred of developpers, which means that it is highly tested and productive. Jbuilder comes with a [[./doc/manual.org][manual]]. If you want to get started without reading too much, you can look at the [[./doc/quick-start.org][quick start guide]]. The [[example]] directory contains examples of projects using jbuilder. [[https://travis-ci.org/janestreet/jbuilder][https://travis-ci.org/janestreet/jbuilder.png?branch=master]] ** Overview Jbuilder reads project metadata from =jbuild= 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 [[https://github.com/ocaml/merlin][merlin]], handle installation, etc... Jbuilder itself 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= explicitly. Especially, 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. Although this hasn't been tested yet. ** Strengths *** Composable Take n repositories that use Jbuilder, arrange them in any way on the file system and the result is still a single repository that Jbuilder knows how to build at once. This make simultaneous development on multiple packages trivial. *** Gracefully handles multi-package repositories Jbuilder knows how to handle repositories containing several packages. When building via [[https://opam.ocaml.org/][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: #+begin_src sh $ jbuilder build --only-packages <package-name> @install #+end_src *** Building against several configurations at once Jbuilder is able to build a given source code repository against several configurations simultaneously. This helps maintaining packages across several versions of OCaml as you can tests them all at once without hassle. This feature should make cross-compilation easy, see details in the [[ROADMAP.org][roadmap]]. This feature requires [[https://opam.ocaml.org/][opam]]. *** Jenga bridge [[https://github.com/janestreet/jenga][Jenga]] is another build system for OCaml that has more advanced features such as polling or much better editor integration. Jenga is more powerful and more complex and as a result as much more dependencies. It is planned to implement a small bridge between the two so that a Jbuilder project can build with Jenga using this bridge. ** Status Jbuilder is now in beta testing stage. Once a bit more testing has been done, it will be released in 1.0. ** Roadmap See [[ROADMAP.org]] for the current plan. Help on any of these points is welcome! ** FAQ *** Why do many Jbuilder projects contain a Makefile? Many Jbuilder project contain a toplevel =Makefile=. It is often only there only for convenience, for the following reasons: 1. there are many different build systems out there, all with a different CLI. If you have been hacking for a long time, the one true invocation you know is =make && make install=, possibly preceded by =./configure= 2. you often have a few common operations that are not part of the build and =make <blah>= is a good way to provide them 3. =make= is shorter to type than =jbuilder build @install= *** How to add a configure step to a jbuilder project? [[example/sample-projects/with-configure-step]] shows one way to do it that preserves composability; i.e. it doesn't require to manually run all =./configure= script when working on multiple projects at the same time. ** Known bugs *** Optional libraries inside a multilib directory [[https://github.com/janestreet/jbuilder/issues/51]] If a directory contains several libraries and some are marked as optional (by adding =(optional)= in the =(library ...)= stanza), then the dependencies will still be required to perform the build. This could be sorted out with some refactoring, but there is a simple workaround, so it is low-priority. **** Workaround Put each optional library in a separate directory. ** Implementation details This section is for people who want to work on Jbuilder itself. *** Bootstrap In order to build itself, Jbuilder uses an OCaml script ([[bootstrap.ml]]) that dumps most of the sources of Jbuilder into a single =boot.ml= file. This file is built using =ocamlopt= or =ocamlc= and used to build everything else. *** OCaml compatibility test Install opam switches for all the entries in the [[jbuild-workspace.dev]] file and run: #+begin_src sh $ make all-supported-ocaml-versions #+end_src *** Repository organization - =vendor/= contains dependencies of Jbuilder, that have been vendored - =plugin/= contains the API given to =jbuild= files that are OCaml scripts - =src/= contains the core of =Jbuilder=, as a library so that it can be used to implement the Jenga bridge later - =bin/= contains the command line interface - =doc/= contains the manual and rules to generate the manual pages *** Design Jbuilder was initially designed to sort out the public release of Jane Street packages which became incredibly complicated over time. It is still successfully used for this purpose. One necessary feature to achieve this is the ability to precisely report the external dependencies necessary to build a given set of targets without running any command, just by looking at the source tree. This is used to automatically generate the =<package>.opam= files for all Jane Street packages. To implement this, the build rules are described using a build arrow, which is defined in [[src/build.mli][src/build]]. In the end it makes the development of the internal rules of Jbuilder very composable and quite pleasant. To deal with process multiplexing, Jbuilder uses a simplified Lwt/Async-like monad, implemented in [[src/future.mli][src/future]]. **** Code flow - [[src/jbuild_types.ml][src/jbuild_types]] contains the internal representation of =jbuild= files and the parsing code - [[src/jbuild_load.ml][src/jbuild_load]] contains the code to scan a source tree and build the internal database by reading the =jbuild= files - [[src/gen_rules.ml][src/gen_rules]] contains all the build rules of Jbuilder - [[src/build_system.ml][src/build_system]] contains a trivial implementation of a Build system. This is what Jenga will provide when implementing the bridge
Dev Dependencies
None
-
ANSITerminal
= "0.8"
-
acgtk
>= "1.3.2" & < "1.4.0"
-
ago
>= "0.4"
-
amqp-client
>= "1.1.0" & < "2.0.3"
-
amqp-client-async
< "2.0.3"
-
amqp-client-lwt
< "2.0.3"
-
ascii85
>= "0.4"
-
async
= "v0.9.0"
-
async_extended
= "v0.9.0"
-
async_extra
= "v0.9.0"
-
async_find
= "v0.9.0"
-
async_inotify
= "v0.9.0"
-
async_interactive
< "v0.10.0"
-
async_js
< "v0.10.0"
-
async_kernel
= "v0.9.0"
-
async_parallel
>= "v0.9.0" & < "v0.10.0"
-
async_rpc_kernel
= "v0.9.0"
-
async_shell
>= "v0.9.0" & < "v0.10.0"
-
async_smtp
= "v0.9.0"
-
async_ssl
= "v0.9.0"
-
async_unix
>= "v0.9.0" & < "v0.10.0"
-
atd
>= "1.2.1" & < "2.2.1"
-
atdgen
>= "1.10.2" & < "2.2.1"
-
atdj
< "2.2.1"
-
aws-s3
>= "1.1.0" & < "4.0.0"
-
aws-s3-async
< "4.0.0"
-
aws-s3-lwt
< "4.0.0"
- balancer
-
base
= "v0.9.2"
-
benchmark
= "1.5"
-
bignum
= "v0.9.0"
-
bin_prot
= "v0.9.0"
-
biniou
>= "1.1.0" & < "1.2.1"
-
biocaml
= "0.8.0"
-
bistro
>= "0.3.0" & < "0.5.0"
-
bitmasks
= "1.1.0"
-
bitstring
>= "3.0.0" & < "3.1.1"
-
brotli
>= "2.0.3"
-
bst
< "3.0.0"
-
build_path_prefix_map
< "0.3"
-
bun
< "0.3.3"
-
calculon
= "0.2"
-
calculon-web
< "0.4"
-
camlimages
>= "5.0.0" & < "5.0.2"
-
camlon
>= "2.0.1" & < "3.0.0"
-
camomile
>= "0.8.6" & < "1.0.0"
-
capnp
>= "3.0.0" & < "3.3.0"
-
caqti
< "0.10.2"
-
caqti-async
< "0.10.2"
-
caqti-driver-mariadb
< "0.10.2"
-
caqti-driver-postgresql
< "0.10.2"
-
caqti-driver-sqlite3
< "0.10.2"
-
caqti-dynload
< "0.10.2"
-
caqti-lwt
< "0.10.2"
-
caqti-type-calendar
< "0.10.2"
-
cfstream
>= "1.2.3" & < "1.3.1"
-
charrua-core
>= "0.8" & < "0.11.2"
-
checkseum
< "0.0.3"
-
cinaps
< "v0.10.0"
-
clarity
< "0.4.0"
-
cmdtui
>= "0.4.3"
- cmdtui-lambda-term
-
coin
< "0.1.1"
-
command_rpc
< "v0.10.0"
-
configurator
< "v0.10.0"
-
core
>= "v0.9.0" & < "v0.10.0"
-
core_bench
= "v0.9.0"
-
core_extended
>= "v0.9.0" & < "v0.10.0"
-
core_kernel
>= "v0.9.0" & < "v0.10.0"
-
core_profiler
= "v0.9.0"
-
cow
= "2.3.0"
-
cowabloga
>= "0.3.0" & < "0.5.0"
-
cpm
= "4.0.0"
- craml
-
crlibm
< "0.3"
-
crowbar
< "0.2"
-
cryptodbm
>= "0.84.2"
-
cstruct
>= "3.0.0" & < "3.1.0"
-
cstruct-async
< "3.3.0"
-
cstruct-lwt
>= "3.0.0" & != "3.2.0" & < "3.3.0"
-
cstruct-unix
>= "3.0.0" & < "3.3.0"
-
csv-lwt
< "2.1"
-
csvfields
< "v0.10.0"
-
cuid
< "0.2"
-
DrawGrammar
= "0.2.1"
-
datakit
>= "0.10.0" & < "0.12.0"
-
datakit-bridge-github
>= "0.10.0" & < "0.12.0"
-
datakit-bridge-local-git
>= "0.10.0" & < "0.12.0"
-
datakit-ci
>= "0.10.0" & < "0.12.0"
-
datakit-client
>= "0.10.0" & < "0.12.0"
-
datakit-client-9p
< "0.12.0"
-
datakit-client-git
< "0.12.0"
-
datakit-github
>= "0.10.0" & < "0.12.0"
-
datakit-server
>= "0.10.0" & < "0.12.0"
-
datakit-server-9p
< "0.12.0"
-
decoders-ezjsonm
< "0.1.2"
-
decompress
= "0.8"
-
digestif
= "0.6.1"
-
dns-async
< "1.1.0"
-
doc-ock
>= "1.1.0"
-
doc-ock-html
>= "1.1.0"
-
doc-ock-xml
>= "1.1.0"
-
dokeysto
< "2.0.0"
-
dokeysto_lz4
< "3.0.0"
- dryunit
-
dtoa
>= "0.3.0" & < "0.3.2"
-
dune-release
< "1.0.0"
- dune_watch
-
easy-format
>= "1.3.0" & < "1.3.2"
-
ecaml
< "v0.10.0"
-
email_message
>= "v0.9.0" & < "v0.10.0"
-
exenum
>= "0.82.0" & < "0.86"
-
expect_test_helpers
< "v0.10.0"
-
expect_test_helpers_kernel
< "v0.10.0"
-
fat-filesystem
>= "0.12.1" & < "0.13.0"
-
fftw3
>= "0.8" & < "0.8.2"
-
fieldslib
= "v0.9.0"
- findlib_top
-
General
>= "0.4.0" & < "0.6.0"
-
gapi-ocaml
= "0.3.6"
-
gdbprofiler
>= "0.2" & < "0.4"
-
get_line
= "4.0.0"
-
git
>= "1.11.0" & < "2.0.0"
-
git-http
>= "1.11.0" & < "2.0.0"
-
git-mirage
>= "1.11.0" & < "2.0.0"
-
git-unix
>= "1.11.1" & < "2.0.0"
-
gnuplot
= "0.5.3"
-
google-drive-ocamlfuse
= "0.6.23"
-
graphql
< "0.8.0"
-
graphql-async
< "0.8.0"
-
graphql-cohttp
< "0.9.0"
-
graphql-lwt
< "0.8.0"
-
graphql_parser
< "0.9.0"
-
grenier
= "0.7"
-
hashids
< "1.0.1"
-
hex
>= "1.1.0" & < "1.3.0"
-
hiredis
>= "0.8"
- hiredis-value
-
incr_dom
< "v0.10.0"
-
incr_map
< "v0.10.0"
-
incr_select
< "v0.10.0"
-
incremental
= "v0.9.0"
-
incremental_kernel
= "v0.9.0"
-
integration1d
= "0.5"
-
interval
= "1.4"
-
inuit
>= "0.4.1"
-
ipaddr
= "2.8.0"
-
irc-client
>= "0.6.0" & < "0.6.2"
-
irc-client-lwt
< "0.6.2"
-
irc-client-tls
< "0.6.2"
-
irc-client-unix
< "0.6.2"
-
irmin
= "1.2.0"
-
irmin-fs
< "1.3.0"
-
irmin-git
= "1.2.0"
-
irmin-http
= "1.2.0"
-
irmin-mem
< "1.3.0"
-
irmin-mirage
= "1.2.0"
-
irmin-unix
= "1.2.0"
-
JsOfOCairo
= "1.0.1"
-
jane-street-headers
< "v0.10.0"
-
jenga
= "v0.9.0"
-
js_of_ocaml-tyxml
< "3.0.1"
- json-wheel_jane_street_overlay
- json_of_jsonm
-
jupyter-kernel
< "0.4"
-
kafka
>= "0.3" & < "0.5"
-
kicadsch
< "0.4.0"
- kubecaml
- kyotocabinet
-
lambda-term
= "1.11"
-
lens
>= "1.2.1" & < "1.2.3"
-
let-if
< "0.2.0"
-
levenshtein
>= "1.1.3"
-
libsvm
= "0.9.4"
-
linenoise
= "1.1.0"
-
links
>= "0.7.2" & < "0.8"
-
links-postgresql
< "0.8"
- llopt
-
malfunction
< "0.3"
-
mastodon-archive-viewer
< "0.2"
-
mccs
< "1.1+3"
- mecab
- mesh-display
-
mesh-graphics
< "0.9.5"
-
milter
>= "1.0.4"
- minimal
-
mirage-block-unix
= "2.8.2"
-
mirage-device
= "1.1.0"
-
mirage-flow
>= "1.3.0" & < "1.6.0"
-
mirage-flow-lwt
>= "1.3.0" & < "1.6.0"
-
mirage-flow-unix
>= "1.3.0" & < "1.6.0"
-
mirage-fs-unix
>= "1.4.0" & < "1.6.0"
-
mirage-kv-lwt
= "1.1.0"
-
mirage-nat
< "1.1.0"
- mirage-net-flow
-
mirage-net-lwt
>= "1.1.0" & < "2.0.0"
-
mirage-net-macosx
= "1.4.0"
-
mirage-vnetif
>= "0.4.0" & < "0.4.2"
- modular-arithmetic
-
monomorphic
= "1.5"
-
moss
< "0.1.1"
-
msgpck
>= "1.3" & < "1.5"
-
mstruct
= "1.3.3"
-
multipart-form-data
= "0.2.0"
-
mustache
= "3.0.2"
- mvar
-
nonstd
>= "0.0.3"
-
npy
>= "0.0.5" & < "0.0.8"
-
nsq
< "0.4.0"
- nullable-array
- numalib
-
nunchaku
>= "0.5.1"
- oc45
-
ocaml-compiler-libs
< "v0.10.0"
-
ocaml-migrate-parsetree
< "1.0.2"
-
ocaml-migrate-parsetree-ocamlbuild
< "1.2.0"
-
ocaml-r
= "0.1.0"
-
ocaml-top
>= "1.1.4" & < "1.2.0"
-
ocaml_plugin
= "v0.9.0"
-
ocamlformat
< "0.5"
- ocamlformat_support
-
ocamlspot
>= "4.07.0.2.3.2"
-
ocp-browser
>= "1.1.6" & < "1.1.9"
-
ocp-index
= "1.1.7"
-
octavius
>= "1.1.0" & < "1.2.2"
-
odoc
>= "1.1.0" & < "1.2.0"
- opaca
- opam-lock
-
opam-package-upgrade
< "0.2"
-
open
< "0.2.2"
-
opium
= "0.16.0"
-
opium_kernel
< "0.17.0"
-
optimization1d
= "0.6"
- orandforest
-
oranger
< "2.0.1"
-
orec
< "1.0.1"
-
orsvm_e1071
< "3.0.2"
-
orxgboost
< "1.1.0"
- osbx
- otetris
-
owl
>= "0.3.0" & < "0.4.0"
-
owl-base
< "0.4.0"
-
owl-top
< "0.4.0"
-
owl-zoo
< "0.4.0"
- pa_sqlexpr
-
parsexp
< "v0.10.0"
-
parsexp_io
< "v0.10.0"
-
patdiff
= "v0.9.0"
-
patience_diff
= "v0.9.0"
-
pecu
< "0.2"
-
phantom-algebra
< "1.0.1"
- phashtbl
-
pla
= "1.2"
-
plotkicadsch
< "0.4.0"
-
posixat
< "v0.10.0"
-
ppx_assert
= "v0.9.0"
-
ppx_ast
< "v0.10.0"
-
ppx_base
< "v0.10.0"
-
ppx_bench
= "v0.9.1"
-
ppx_bin_prot
= "v0.9.0"
-
ppx_bitstring
>= "2.0.0" & < "4.0.0"
-
ppx_blob
>= "0.3.0" & < "0.6.0"
-
ppx_compare
= "v0.9.0"
-
ppx_compose
< "0.1.0"
-
ppx_conv_func
= "v0.9.0"
-
ppx_core
>= "v0.9.0" & < "v0.9.3"
-
ppx_cstruct
>= "3.0.1" & < "3.2.0"
-
ppx_csv_conv
= "v0.9.0"
-
ppx_custom_printf
= "v0.9.0"
-
ppx_derivers
< "1.2.1"
-
ppx_deriving_madcast
< "0.2"
-
ppx_deriving_protocol
< "0.8.1"
-
ppx_deriving_rpc
< "6.1.0"
-
ppx_driver
>= "v0.9.1" & < "v0.10.0"
- ppx_dryunit
-
ppx_enumerate
= "v0.9.0"
-
ppx_expect
= "v0.9.0"
-
ppx_fail
= "v0.9.0"
-
ppx_fields_conv
= "v0.9.0"
-
ppx_gen_rec
< "1.1.0"
- ppx_graphql
-
ppx_hardcaml
= "1.3.0"
-
ppx_hash
< "v0.10.0"
-
ppx_here
= "v0.9.1"
-
ppx_inline_test
= "v0.9.1"
- ppx_integer
-
ppx_jane
= "v0.9.0"
-
ppx_js_style
< "v0.10.0"
-
ppx_let
= "v0.9.0"
-
ppx_meta_conv
= "4.0.0"
-
ppx_metaquot
< "v0.10.0"
-
ppx_monadic
>= "2.3.0"
- ppx_nanocaml
-
ppx_optcomp
= "v0.9.0"
-
ppx_optional
< "v0.10.0"
-
ppx_orakuda
>= "3.3.0"
-
ppx_pipebang
= "v0.9.0"
-
ppx_poly_record
>= "1.3.0"
-
ppx_protocol_conv
< "2.0.0"
-
ppx_protocol_conv_json
< "3.1.0"
-
ppx_protocol_conv_msgpack
< "3.1.0"
-
ppx_protocol_conv_xml_light
< "3.1.0"
-
ppx_protocol_conv_yaml
< "3.1.0"
-
ppx_regexp
< "0.4.0"
-
ppx_sexp_conv
= "v0.9.0"
-
ppx_sexp_message
= "v0.9.0"
-
ppx_sexp_value
= "v0.9.0"
- ppx_sqlexpr
-
ppx_test
= "1.6.0"
-
ppx_traverse
< "v0.10.0"
-
ppx_traverse_builtins
< "v0.10.0"
-
ppx_type_conv
= "v0.9.0"
-
ppx_typerep_conv
= "v0.9.0"
-
ppx_variants_conv
= "v0.9.0"
- ppx_view
-
ppx_xml_conv
= "v0.9.0"
-
ppxx
>= "2.3.1" & < "2.4.0"
-
prometheus
= "0.2"
-
prometheus-app
= "0.2"
-
protocol-9p
>= "0.10.0" & < "0.11.2"
-
protocol-9p-tool
< "0.11.3"
-
protocol-9p-unix
< "0.11.2"
- pumping
-
qcheck
= "0.8"
-
qcow
>= "0.10.0" & < "0.10.3"
-
qcow-tool
< "0.11.0"
-
radare2
= "0.0.2"
-
re
= "1.7.2"
-
re2
= "v0.9.0"
-
reason
>= "3.0.3" & < "3.3.5"
-
redis
>= "0.3.4" & < "0.4"
-
redis-lwt
< "0.4"
-
redis-sync
< "0.4"
-
reed-solomon-erasure
< "1.0.2"
-
regenerate
< "0.2"
-
resp-server
< "0.9"
-
rfc1951
< "0.8.1"
-
rope
>= "0.6" & < "0.6.2"
-
rpc
>= "5.9.0" & < "6.1.0"
-
rpc_parallel
= "v0.9.0"
-
rpclib-async
< "6.1.0"
-
rpclib-lwt
< "6.1.0"
-
rtop
< "3.3.5"
-
safepass
= "3.0"
-
sanddb
< "0.2"
-
sequence
>= "1.1"
-
sexp_pretty
< "v0.10.0"
-
sexplib
>= "v0.9.0" & < "v0.9.2"
-
shexp
< "v0.10.0"
-
smbc
= "0.4.2"
-
spacetime_lib
= "0.2.0"
-
spawn
= "v0.9.0"
-
spf
>= "2.0.2"
-
sphinxcontrib-ocaml
>= "0.3.0"
-
spotlib
= "4.0.3"
-
sqlexpr
>= "0.9.0"
-
srs
>= "2.0.0"
-
ssh-agent
< "0.2.0"
- sslconf
-
stdint
= "0.5.1"
-
stdio
< "v0.10.0"
-
swagger
< "0.2.0"
-
tar
< "1.0.0"
-
tar-mirage
< "1.0.0"
-
tar-unix
< "1.0.0"
-
telegraml
>= "2.2.0"
-
tensorflow
= "0.0.10"
-
textutils
= "v0.9.0"
-
tiny_json
>= "1.1.5"
- topkg-jbuilder
-
toplevel_expect_test
>= "v0.9.1" & < "v0.10.0"
-
topological_sort
< "v0.10.0"
- traildb
-
travis-opam
>= "1.2.0" & < "1.5.0"
-
trax
< "0.4.0"
-
treeprint
= "2.2.0"
-
tube
< "4.1"
-
typerep
= "v0.9.0"
-
typerep_extended
>= "v0.9.0"
-
typpx
>= "1.4.3"
-
tyre
>= "0.4" & < "0.5"
-
unmagic
>= "1.0.4"
-
uri
>= "1.9.4" & < "2.0.0"
-
uuuu
< "0.1.1"
-
variantslib
= "v0.9.0"
- varint
-
vcardgen
< "1.2"
-
vhd-format
>= "0.9.1" & < "0.12.0"
-
vhd-format-lwt
< "0.12.0"
-
virtual_dom
< "v0.10.0"
-
vlq
< "0.2.1"
-
vpt
< "5.0.0"
-
wall
< "0.4"
-
wamp
>= "1.2"
- wamp-msgpck
- wamp-yojson
- wcs-api
- wcs-lib
-
weberizer
= "0.7.8"
-
wtf8
< "1.0.2"
-
yara
< "0.2"
-
yojson
>= "1.4.0" & < "1.5.0"
-
yuscii
< "0.2.0"
-
zed
= "1.5"
-
zipperposition
= "1.5"
Conflicts
None