ocaml_import Last updated Mar 27, 2025

load("@rules_ocaml//build:rules.bzl", "ocaml_import")

Imports pre-compiled OCaml files.

Attributes

Name Description Type Mandatory Default

name

A unique name for this target.

Name

required

deps

-

List of labels

optional

[]

srcs

-

List of labels

optional

[]

afiles

list of .a files that go with .cmxa files

List of labels

optional

[]

all

Glob all cm* files except for 'archive' or 'plugin' so they can be added to action ldeps (rather than cmd line). I.e. the (transitive) deps of an archive, which must be accessible to the compiler (via search path, not command line), and so must be added to the action ldeps.

List of labels

optional

[]

archive

-

Label

optional

None

astructs

-

List of labels

optional

[]

cc_deps

C archive files (.a) for integrating OCaml and C libs

List of labels

optional

[]

cmtis

-

List of labels

optional

[]

cmts

-

List of labels

optional

[]

cmxs

-

Label

optional

None

dllibs

Dynamically-loadable, for ocamlrun. Standard naming is 'dll<name>_stubs.so' or 'dll<name>.so'.

List of labels

optional

[]

doc

-

String

optional

""

jsoo_runtime

-

Label

optional

None

ocaml_version

-

String

optional

""

ofiles

list of .o files that go with .cmx files

List of labels

optional

[]

plugin

-

Label

optional

None

ppx_codeps

-

List of labels

optional

[]

sigs

-

List of labels

optional

[]

version

-

String

optional

""