ocaml_signature Last updated Mar 27, 2025
load("@rules_ocaml//build:rules.bzl", "ocaml_signature")
ocaml_signature(name, deps, src, env, module_name, ns, open, opts, pack, ppx, ppx_args, ppx_data, ppx_print, ppx_verbose, xmo)
Generates OCaml .cmi (inteface) file. (signatures). Provides OCamlSignatureProvider
.
CONFIGURABLE DEFAULTS for rule ocaml_signature
In addition to the [Configurable defaults] that
apply to all ocaml_*
rules, the following apply to this rule. (Note
the difference between '/' and ':' in such labels):
Label | Default | opts attrib |
---|---|---|
@rules_ocaml//cfg/signature/linkall |
True |
|
@rules_ocaml//cfg/signature:warnings |
|
|
Attributes
Name | Description | Type | Mandatory | Default |
---|---|---|---|---|
A unique name for this target. |
required |
|||
List of OCaml dependencies. Use this for compiling a .mli source file with deps. See [Dependencies](#deps) for details. |
optional |
[] |
||
A single .mli source file label |
optional |
None |
||
Env variables |
optional |
{} |
||
Set module (sig) name to this string |
String |
optional |
"" |
|
Bottom-up namespacing |
optional |
None |
||
List of OCaml dependencies to be passed with -open. |
optional |
[] |
||
List of compile options; overrides configurable default options. Supports |
List of strings |
optional |
[] |
|
Experimental |
String |
optional |
"" |
|
Label of |
optional |
None |
||
Options to pass to PPX executable passed by the |
List of strings |
optional |
[] |
|
PPX runtime data dependencies. List of labels of files needed by the PPX executable passed via the |
optional |
[] |
||
Format of output of PPX transform: binary (default) or text. Value must be one of |
optional |
None |
||
- |
Boolean |
optional |
False |
|
Cross-module optimization. If false, compile with -opaque |
Boolean |
optional |
True |