package b0

  1. Overview
  2. Docs
Legend:
Library
Module
Module type
Parameter
Class
Class type

Driver configuration.

Default file names

val b0_file_name : string

b0_file_name is "B0.ml" the default B0 file name.

val drivers_dir_name : string

driver_dir_name is ".drivers" the default directory for drivers in the b0 directory.

Configurations

type t

The type for configurations.

val v : b0_dir:B00_std.Fpath.t -> b0_file:B00_std.Fpath.t option -> cache_dir:B00_std.Fpath.t -> cwd:B00_std.Fpath.t -> code:B00_ocaml.Conf.code option -> hash_fun:(module B00_std.Hash.T) -> jobs:int -> log_level:B00_std.Log.level -> no_pager:bool -> tty_cap:B00_std.Tty.cap -> unit -> t

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

val b0_file : t -> B00_std.Fpath.t option

b0_file is the absolute path to the B0 file (if any).

val b0_dir : t -> B00_std.Fpath.t

b0_dir is the absolute path to the b0 directory.

val cache_dir : t -> B00_std.Fpath.t

cache_dir is the absolute path to the cache directory.

val cwd : t -> B00_std.Fpath.t

cwd is the absolute path to the current working directory.

val code : t -> B00_ocaml.Conf.code option

code is the code to which the driver is compiled.

val hash_fun : t -> (module B00_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 -> B00_std.Log.level

log_level is the desired log level.

val memo : t -> (B00.Memo.t, string) result

memo is the memoizer for the configuration.

val no_pager : t -> bool

no_pager indicates no paging is desired on stdout.

val tty_cap : t -> B00_std.Tty.cap

tty_cap is the terminal capability to assume for outputs.

Derived data

val get_b0_file : t -> (B00_std.Fpath.t, string) result

get_b0_file provides an error message if b0_file is None.

Setup

val setup_with_cli : b0_dir:B00_std.Fpath.t option -> b0_file:B00_std.Fpath.t option -> cache_dir:B00_std.Fpath.t option -> code:B00_ocaml.Conf.code option -> hash_fun:(module B00_std.Hash.T) option -> jobs:int option -> log_level:B00_std.Log.level option -> no_pager:bool -> tty_cap:B00_std.Tty.cap option option -> unit -> (t, string) 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.

OCaml

Innovation. Community. Security.