Module B0_jbuilder

module B0_jbuilder: sig .. end
jbuilder compatibility.

This module reads jbuild files and expose them as B0_ocaml.Unit build units. For the time being you need to write a file and simply invoke B0_jbuilder.import to load your files.

References. The jbuilder documentation.

TODO As it stands this is a proof of concept, a larger set of fields and stanzas should be supported but for this to happen a real world B0_ocaml needs to exist. Also automatic jbuild file lookup could be improved possibly even eschewing the need to write a file at all.

Import jbuild files

val import : unit -> unit
import () lookup for jbuild files in the directory and direct subdirectories of the description file that invokes it and represents their stanzas as build units.
val import_file : B0.Fpath.t -> unit
import_file f represents the stanzas in f as build units. If f is relative it is expressed relative to the directory of description files that invokes it.

Low-level functions

type t 
The type for jbuild file stanzas
val of_file : ?log:B0.Log.level -> B0.Fpath.t -> t B0.result
of_file f reads a jbuild file from f. log is used to report parse errors, for now it defaults to Some Log.Debug.
val to_units : ?log:B0.Log.level -> t -> unit
add_units j translate the library and executable[s] stanzas as B0_ocaml build units.

log is used to report errors, for now it defaults to Some Log.Debug.