ocaml_runtime Last updated Mar 27, 2025

load("@rules_ocaml//build/_rules:ocaml_runtime.bzl", "ocaml_runtime")

ocaml_runtime(name, deps, env, opts, sys_runtime)

Builds a customized OCaml runtime using ocamlc -make-runtime.

Attributes

Name Description Type Mandatory Default

name

A unique name for this target.

Name

required

deps

Libraries whose cc deps should be included in the runtime

List of labels

optional

[]

env

Env variables

Dictionary: String -> String

optional

{}

opts

List of compile options; overrides configurable default options. Supports -no- prefix for each option; for example, -no-linkall.

List of strings

optional

[]

sys_runtime

System runtime to use:

@rules_ocaml//rt:std - standard (default) @rules_ocaml//rt:dbg - debug @rules_ocaml//rt:i - instrumented

Label

optional

None