ocaml_ns_config Last updated Mar 27, 2025
load("@rules_ocaml//build:rules.bzl", "ocaml_ns_config")
ocaml_ns_config(name, env, import_as, ns_import_as, ns_merge, ns_name, opts, private, submodules)
Generates a source <ns>.ml
file containing the module aliasing equations needed to define an OCaml build namespace.
Attributes
Name | Description | Type | Mandatory | Default |
---|---|---|---|---|
A unique name for this target. |
required |
|||
Env variables |
optional |
{} |
||
Import exogenous (non-namepaced) modules. Exogenous (sub)modules, namespaced or non-namespaced. Aliased names will not be prefixed with ns name of this ns_config. Keys: labels of modules; Values: alias name to be used in this resolver. e.g. module R = Red |
optional |
{} |
||
Import exogenous namespaces ( Dictionary: keys are exogenous namespaces ( |
optional |
{} |
||
Merges all submodules of an exogenous namespace. |
optional |
[] |
||
Use this as the ns name (prefix string) |
String |
optional |
"" |
|
List of compile options; overrides configurable default options. Supports |
List of strings |
optional |
[] |
|
When True, adds suffix Not to be confused with the visibility attribute, which controls visibility of the target within the Bazel environment. |
Boolean |
optional |
False |
|
List of strings from which submodule names are to be derived for aliasing. Bazel labels may be used; the submodule name will be derived from the target part. For example, '//a/b:c' normalizes to C. But they are just strings, and will not be checked against any files. The normalized submodule names must match the names of the modules electing membership via the 'ns_config' attribute. |
List of strings |
optional |
[] |