Module B0caml.Conf

b0caml configuration.

type comp_target = [
  1. | `Auto
  2. | `Byte
  3. | `Native
]

The type for compilation targets.

val comp_target_of_string : string -> (comp_target, string) Stdlib.result

comp_target_of_string s parses a compilation target from s.

Configurations

type t

The type for configurations.

val make : cache_dir:B0_std.Fpath.t -> comp_target:comp_target -> cwd:B0_std.Fpath.t -> ocamlpath:B0caml_ocamlpath.t -> unit -> t

v constructs a configuration with the given attributes. See the corresponding accessors for details.

val cache_dir : t -> B0_std.Fpath.t

cache_dir c is the cache directory.

val b0_cache_dir : t -> B0_std.Fpath.t

b0_cache_dir c is the b0 cache directory.

val comp_target : t -> comp_target

comp_target c is the target to which scripts are compiled.

val cwd : t -> B0_std.Fpath.t

cwd c is the current working directory w.r.t. relative configuration file paths are expressed.

val ocamlpath : t -> B0caml_ocamlpath.t

ocamlpath is the OCAMLPATH to consider.

val memo : t -> B0_std.Fpath.t -> (B0_memo.t, string) Stdlib.result

memo c script is the memoizer for the configuration and script script.

Setup

val of_cli : unit -> (t, string) Stdlib.result Cmdliner.Term.t

of_cli is a configuration command line interaface. This setups logging by side-effect.

val of_env : unit -> (t, string) Stdlib.result

of () is an configuration read from the environments. This setups logging by side-effect.