package b0
Install
Dune Dependency
Authors
Maintainers
Sources
sha512=00a6868b4dfa34565d0141b335622a81a0e8d5b9e3c6dfad025dabfa3df2db2a1302b492953bbbce30c3a4406c324fcec25250a00b38f6d18a69e15605e3b07e
doc/b0_b00_kit/B00_ocaml/Lib/index.html
Module B00_ocaml.Lib
Library information and lookup.
An OCaml library is a directory with interfaces and object files. OCaml libraries are resolved by name using a B00_ocaml.Resolver
.
Library names
module Name : sig ... end
Library names.
Libraries
val v :
name:Name.t ->
requires:Name.t list ->
dir:B0_std.Fpath.t ->
cmis:B0_std.Fpath.t list ->
cmxs:B0_std.Fpath.t list ->
cma:B0_std.Fpath.t option ->
cmxa:B0_std.Fpath.t option ->
c_archive:B0_std.Fpath.t option ->
c_stubs:B0_std.Fpath.t list ->
js_stubs:B0_std.Fpath.t list ->
t
v ~name ~cmis ~cmxs ~cma ~cmxa
is a library named name
which requires libraries requires
, and library directory dir
, has cmis
cmi files, cmxs
cmx files, cma
bytecode archive, cmxa
native code archive and it's companion c_archive
as well as c_stubs
archives. Theoretically all files should be in dir
.
val of_dir :
B00.Memo.t ->
clib_ext:B0_std.Fpath.ext ->
name:Name.t ->
requires:Name.t list ->
dir:B0_std.Fpath.t ->
archive:string option ->
js_stubs:B0_std.Fpath.t list ->
(t, string) Stdlib.result B0_std.Fut.t
of_dir m ~clib_ext ~name ~requires ~dir ~archive
is a library named name
which requires libraries requires
, with library directory dir
and library archive name archive
(without extension and if any) and JavaScript stubs js_stubs
. This looks up all files other files in dir
and makes them ready in m
. It also makes js_stubs
files ready. clib_ext
is the platform specific extension for C libraries.
Note. If dir
doesn't follow the one library per directory convention this over-approximate cmis
, cmxs
and c_stubs
files.
val dir : t -> B0_std.Fpath.t
dir l
is l
's library directory.
val cmis : t -> B0_std.Fpath.t list
cmis l
is the list of cmis for the library.
val cmxs : t -> B0_std.Fpath.t list
cmxs l
is the list of cmxs for the library.
val cma : t -> B0_std.Fpath.t option
cma l
is the library's cma file (if any).
val cmxa : t -> B0_std.Fpath.t option
cmxa l
is the library's cmxa file (if any).
val c_archive : t -> B0_std.Fpath.t option
c_archive l
is the library's cmxa
's companion C archive. Must exist if the cmxa
exists and, since 4.12 if cmxa
is not empty.
val c_stubs : t -> B0_std.Fpath.t list
c_stubs l
is the library's C stubs archives (if any).
val js_stubs : t -> B0_std.Fpath.t list
js_stubs l
is the library's JavaScript stubs (if any).
module Resolver : sig ... end
Library resolvers.