package odig

  1. Overview
  2. Docs

cmxa files.

Cmxa

type t = cmxa

The type for cmxa files.

val read : Fpath.t -> (t, [ `Msg of string ]) Pervasives.result

read f reads a cmxa file from f.

val name : cmxa -> string

name cmxa is cmxa's basename.

val cmxs : cmxa -> cmx list

cmxs cmxa are the cmxs contained in the cmxa.

val cobjs : cmxa -> string list

cobjs are C objects needed files needed for linking.

val copts : cmxa -> string list

copts are options for the C linker.

val path : cmxa -> Fpath.t

path cmxa is the file path to the cmxa file.

Derived information

names ~init cmxa adds to init (defaults to String.Map.empty) the module names defined by cmxa mapped to their cmi digests. If a name already exists in init it is overriden.

val cmi_digests : ?init:string Digest.map -> cmxa -> string Digest.map

cmi_digests ~init cmxa adds to init (defaults to Digest.Map.empty) the cmi digests of the modules defined by cmxa mapped to their module name. If a digest already exists in init it is overriden.

val to_cmi_deps : ?init:dep list -> cmxa -> dep list

to_cmi_deps ~init cmxa adds to init (default to []) the module names and cmi digests of the modules defined by cmxa.

val cmi_deps : ?conflict:(string -> keep:Digest.t -> Digest.t -> unit) -> cmxa -> dep list

cmi_deps ~conflict cmxa is the list of cmi imported by the cmxs in the library. The result excludes self-dependencies that is the set cmi_digest of digests that are implemented by the cmxa itself.

conflict is called if the module interface of a dependency sports two different digests in the archive. The default function logs a warning.

OCaml

Innovation. Community. Security.