Dune The OCaml build system Jeremie Dimino, Jane Street @diml - - PowerPoint PPT Presentation
Dune The OCaml build system Jeremie Dimino, Jane Street @diml - - PowerPoint PPT Presentation
Dune The OCaml build system Jeremie Dimino, Jane Street @diml @dimenix The history of Dune At the beginning, there was omake, ocamlbuild, ... ... then Jane Street did Jenga and the Jenga rules... ... then a domain specic tool called
SLIDE 1
SLIDE 2
SLIDE 3
SLIDE 4
The history of Dune
SLIDE 5
At the beginning, there was omake, ocamlbuild, ... ... then Jane Street did Jenga and the Jenga rules... ... then a domain specic tool called jbuilder... ... and nally Dune.
SLIDE 6
What is Dune?
SLIDE 7
- bin/foo.exe
- lib/foo/foo.cma
- lib/foo/foo.cmi
- ...
- share/man/man1/foo.1
- doc/foo/LICENSE.md
- ...
Project
src/dune test/dune example/dune
(library (public_name mylib) (libraries base re lwt)) ; Custom build rule (rule (with-stdout-to m.ml (run gen/gen.exe)))
SLIDE 8
Build system OCaml Build Logic Dune language
SLIDE 9
Interesng Dune features
Composability Multiple build contexts
SLIDE 10
How does it work?
SLIDE 11
Rule producer Rule executor (scheduler+rebuilder)
SLIDE 12
let read_dune_file fname = let contents = read_file fname in parse_dune_file fname let get_lib dir = let stanzas = read_dune_file (Path.relative dir "dune") in List.find_map stanzas ~f:(function | Library lib -> Some lib.name | _ -> None)
SLIDE 13
Memoisaon framework
get_lib("foo/src") read_dune_file("foo/src/dune") read_file("foo/src/dune")
SLIDE 14
The end
dune.build discuss.ocaml.org
- pensource.janestreet.com