package stdune

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

Module Stdune.ConfigSource

General dune configuration library for non user facing configuration.

The configuration available through this module is non user facing and is subject to change without warning.

Sourcetype 'a t

A configuration value. All configuration values have a name and can be configured with the environment variable "DUNE_CONFIG__$name" where $name is the configuration option's name in uppercase

Sourcemodule Toggle : sig ... end
Sourceval make : name:string -> of_string:(string -> ('a, string) result) -> default:'a -> 'a t

make ~name ~of_string ~default registers a config value called name, parsed using of_string, defaulting to default.

Sourceval make_toggle : name:string -> default:Toggle.t -> Toggle.t t
Sourceval make_toggle_lazy_init : name:string -> default:Toggle.t -> Toggle.t t
Sourceval is_initialized : unit -> bool

is_initialized () returns whether init has been called

Sourceval get : 'a t -> 'a

get t return the value of the configuration for t

Sourceval global_lock : Toggle.t t

should dune acquire the global lock before building

Sourceval cutoffs_that_reduce_concurrency_in_watch_mode : Toggle.t t

whether dune should add cutoff to various memoized functions where it reduces concurrency

Sourceval copy_file : [ `Portable | `Best ] t

whether dune should optimize file copying on Linux/MacOS

Sourceval background_actions : Toggle.t t

Execute some actions in background threads. See Action_exec for the concrete list of actions

Sourceval background_digests : Toggle.t t

Compute digests of files in a background thread

Sourceval background_sandboxes : Toggle.t t

Build and destroy sandboxes in background threads

Sourceval background_file_system_operations_in_rule_execution : Toggle.t t

Run file operations when executing rules in background threads

Sourceval threaded_console : Toggle.t t

Whether to use the threaded console.

Sourceval threaded_console_frames_per_second : [ `Default | `Custom of int ] t

The number of frames per second for the threaded console.

Sourceval init : (Loc.t * string) String.Map.t -> unit

Before any configuration value is accessed, this function must be called with all the configuration values from the relevant config file (dune-workspace, or dune-config).

Note that environment variables take precedence over the values passed here for easy overriding.