B0caml.Conf
b0caml
configuration.
val comp_target_of_string : string -> (comp_target, string) Stdlib.result
comp_target_of_string s
parses a compilation target from s
.
val v :
cache_dir:B0_std.Fpath.t ->
comp_target:comp_target ->
cwd:B0_std.Fpath.t ->
log_level:B0_std.Log.level ->
ocamlpath:B0caml_ocamlpath.t ->
fmt_styler:B0_std.Fmt.styler ->
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 log_level : t -> B0_std.Log.level
log_level c
is the desired log level.
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
.
val fmt_styler : t -> B0_std.Fmt.styler
fmt_styler c
is formatting styler assumed for output.
val setup_with_cli :
cache_dir:B0_std.Fpath.t option ->
comp_target:comp_target option ->
log_level:B0_std.Log.level option ->
color:B0_std.Fmt.styler option option ->
unit ->
(t, string) Stdlib.result
setup_with_cli ~cache_dir ~comp_target ~color ~log_level ()
determines and setups a configuration with the given values. These are expected to have been determined by environment variables and command line arguments.
val setup_without_cli : unit -> (t, string) Stdlib.result
setup_without_cli
determines and setups a configuration without without command line arguments. This looks up environment variables and determines defaults.