Module Assemblage.Lib

module Lib: sig .. end
Library part.

Defines a library's build products by gathering a set of unit parts.



Metadata


type kind = [ `C | `OCaml | `OCaml_pp ] 
The type for kinds of libraries.
val pp_kind : Format.formatter -> kind -> unit
pp_kind ppf k prints an unspecified representation of k on ppf.
val kind : [< `Lib ] Assemblage.part -> kind
kind p is the kind of p.
val byte : [< `Lib ] Assemblage.part -> bool
byte p is true if p can compile to OCaml byte code.
val native : [< `Lib ] Assemblage.part -> bool
native p is true if p can compile to native code.
val native_dynlink : [< `Lib ] Assemblage.part -> bool
native p is true if p can compile to native dynamically linked code.
val ocaml : [< Assemblage.part_kind ] Assemblage.part ->
[< Assemblage.part_kind > `Lib ] Assemblage.part option
ocaml p is Some p iff p is an `OCaml library.
val ocaml_pp : [< Assemblage.part_kind ] Assemblage.part ->
[< Assemblage.part_kind > `Lib ] Assemblage.part option
ocaml_pp p is Some p iff p is `OCaml_pp library.
val c : [< Assemblage.part_kind ] Assemblage.part ->
[< Assemblage.part_kind > `Lib ] Assemblage.part option
c p is Some p iff p is a `C library.

Libraries


val v : ?usage:Assemblage.Part.usage ->
?exists:bool Assemblage.Conf.value ->
?args:Assemblage.Args.t ->
?byte:bool ->
?native:bool ->
?native_dynlink:bool ->
string ->
kind ->
[< `Lib | `Pkg | `Unit ] Assemblage.part list ->
[< Assemblage.part_kind > `Lib ] Assemblage.part
v ?byte ?native ?native_dynlink name kind needs is a library named name of the given kind. needs has the compilation units us that define the libary, they are integrated. The package and libraries that are in needs are automatically added to us needs.

The library's ability to compile to different targets is specified by the arguments ?byte, ?native and ?native_dynlink whose defaults respectively depend on kind as follows.

Whether the outputs associated to a compilation target are concretly build depends on the configuration keys Assemblage.Conf.ocaml_byte, Assemblage.Conf.ocaml_native, Assemblage.Conf.ocaml_native_dynlink and Assemblage.Conf.c_dynlink.