Module Topkg_conf

Build configuration

See Topkg.Conf.

Configuration key value converters

type 'a conv
val conv : ?docv:string -> (string -> 'a Topkg_result.result) -> (Stdlib.Format.formatter -> 'a -> unit) -> 'a conv
val conv_with_docv : 'a conv -> docv:string -> 'a conv
val conv_parser : 'a conv -> string -> 'a Topkg_result.result
val conv_printer : 'a conv -> Stdlib.Format.formatter -> 'a -> unit
val conv_docv : 'a conv -> string
val bool : bool conv
val int : int conv
val string : string conv
val fpath : Topkg_fpath.t conv
val some : ?none:string -> 'a conv -> 'a option conv

Configuration keys

type 'a key
val key : ?docv:string -> ?doc:string -> ?env:string -> string -> 'a conv -> absent:'a -> 'a key
val discovered_key : ?docv:string -> ?doc:string -> ?env:string -> string -> 'a conv -> absent:(unit -> 'a Topkg_result.result) -> 'a key
val with_pkg : ?default:bool -> string -> bool key
val pp_keys_cli_opts : Stdlib.Format.formatter -> unit -> unit

Build configuration

type t
val empty : t
val value : t -> 'a key -> 'a
val pp_value : t -> Stdlib.Format.formatter -> 'a key -> unit
val dump : Stdlib.Format.formatter -> t -> unit
val of_cli_args : pkg_name:string -> build_dir:Topkg_fpath.t -> string list -> t Topkg_result.result
val pkg_name : t -> string
val build_dir : t -> Topkg_fpath.t
val vcs : t -> bool
val pinned : t -> bool
val dev_pkg : t -> bool
val jobs : t -> int
type build_context = [
| `Dev
| `Distrib
| `Pin
]
val build_context : t -> [ `Dev | `Distrib | `Pin ]
val build_tests : t -> bool
val debug : t -> bool
val debugger_support : t -> bool
val profile : t -> bool
val toolchain : t -> string option

Tool lookup

type os = [
| `Build_os
| `Host_os
]
val tool : ?conf:t -> string -> os -> Topkg_cmd.t

OCaml configuration

module OCaml : sig ... end