dune
play

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


  1. Dune The OCaml build system Jeremie Dimino, Jane Street @diml @dimenix

  2. The history of Dune

  3. At the beginning, there was omake, ocamlbuild, ... ... then Jane Street did Jenga and the Jenga rules... ... then a domain speci�c tool called jbuilder... ... and �nally Dune.

  4. What is Dune?

  5. - bin/foo.exe example/dune - lib/foo/foo.cma - lib/foo/foo.cmi Project - ... - share/man/man1/foo.1 src/dune - doc/foo/LICENSE.md test/dune - ... (library (public_name mylib) (libraries base re lwt)) ; Custom build rule (rule (with-stdout-to m.ml (run gen/gen.exe)))

  6. Dune language OCaml Build Logic Build system

  7. Interes�ng Dune features Composability Multiple build contexts

  8. How does it work?

  9. Rule producer Rule executor (scheduler+rebuilder)

  10. 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)

  11. Memoisa�on framework get_lib("foo/src") read_dune_file("foo/src/dune") read_file("foo/src/dune")

  12. The end dune.build discuss.ocaml.org opensource.janestreet.com

Recommend


More recommend