ppx_executable Last updated Mar 27, 2025
load("@rules_ppx//build:rules.bzl", "ppx_executable")
ppx_executable(name, data, archive_deps, bin, cc_deps, cc_linkall, cc_linkopts, data_prefix_map, env, epilogue, exe, exe_name, force_archived_libdeps, main, opts, ppx_codeps, prologue, runtime, vm_linkage)
Generates a PPX executable. Provides: [OcamlExecutableMarker](providers_ppx.md#ppxexecutableprovider).
Attributes
Name | Description | Type | Mandatory | Default |
---|---|---|---|---|
A unique name for this target. |
required |
|||
Runtime data dependencies. E.g. a file used by %%import from ppx_optcomp. |
optional |
[] |
||
- |
Boolean |
optional |
False |
|
Precompiled ppx executable |
optional |
None |
||
C/C++ library dependencies |
optional |
{} |
||
True: use |
optional |
[] |
||
List of C/C link options. E.g. `["-lstd"]`. |
List of strings |
optional |
[] |
|
Map for replacing path prefixes of data files. May be used to strip a path prefix (set value to empty string ""). |
optional |
{} |
||
Env variables |
optional |
{} |
||
List of OCaml dependencies. |
optional |
[] |
||
Name for output executable file. Overrides 'name' attribute. |
String |
optional |
"" |
|
By default, executable name is derived from 'name' attribute; use this to override. |
String |
optional |
"" |
|
Force archiving of library dependencies |
Boolean |
optional |
False |
|
A module to be listed after those in 'prologue' and before those in 'epilogue'. For more information see [Main Module](../ug/ppx.md#main_module). |
required |
|||
List of compile options; overrides configurable default options. Supports |
List of strings |
optional |
[] |
|
List of non-opam adjunct dependencies (labels). |
optional |
[] |
||
List of OCaml dependencies. |
optional |
[] |
||
runtime to use |
optional |
"@rules_ocaml//rt:std" |
||
custom, dynamic or static. Custom means link with -custom flag; static with -output-complete-exe |
String |
optional |
"custom" |