B0_driver.Conf
Driver configuration.
driver_dir_name
is ".drivers"
the default directory for drivers in the b0 directory.
val make :
b0_dir:B0_std.Fpath.t ->
b0_file:B0_std.Fpath.t option ->
cache_dir:B0_std.Fpath.t ->
cwd:B0_std.Fpath.t ->
code:B0_ocaml.Code.t option ->
env:B0_std.Os.Env.t ->
hash_fun:(module B0_std.Hash.T) ->
jobs:int ->
log_level:B0_std.Log.level ->
no_pager:bool ->
fmt_styler:B0_std.Fmt.styler ->
unit ->
t
make
constructs a configuration with given attributes. See the accessors for semantics.
val b0_file : t -> B0_std.Fpath.t option
b0_file
is the absolute path to the b0 file (if any).
val b0_dir : t -> B0_std.Fpath.t
b0_dir
is the absolute path to the b0 directory.
val cache_dir : t -> B0_std.Fpath.t
cache_dir
is the absolute path to the cache directory.
val cwd : t -> B0_std.Fpath.t
cwd
is the absolute path to the current working directory.
val code : t -> B0_ocaml.Code.t option
code
is the code to which the driver is compiled.
val env : t -> B0_std.Os.Env.t
env
is the process environment of the driver.
val hash_fun : t -> (module B0_std.Hash.T)
hash_fun
is the hash function to use for build caching.
val jobs : t -> int
jobs
is the maximal number of spawns allowed.
val log_level : t -> B0_std.Log.level
log_level
is the desired log level.
val no_pager : t -> bool
no_pager
indicates no paging is desired on stdout.
val fmt_styler : t -> B0_std.Fmt.styler
fmt_styler
is the styler to assume for outputs.
val get_b0_file : t -> (B0_std.Fpath.t, string) Stdlib.result
get_b0_file
provides an error message if b0_file
is None
.
val setup_with_cli :
b0_dir:B0_std.Fpath.t option ->
b0_file:B0_std.Fpath.t option ->
cache_dir:B0_std.Fpath.t option ->
code:B0_ocaml.Code.t option ->
hash_fun:(module B0_std.Hash.T) option ->
jobs:int option ->
log_level:B0_std.Log.level option ->
no_pager:bool ->
color:B0_std.Fmt.styler option option ->
unit ->
(t, string) Stdlib.result
setup_with_cli
determines and setups a configuration with the given values. These are expected to have been determined by environment variables and command line arugments.