MlFront_Config.RemoteSpec
The security specification. The meanings of the fields match those in OpenAPI 3.1 Security Scheme Object. However, implementations can choose to implement as little or as much of the security specification as they want.
type t = {
sec : sec option;
mirrors_src : string list;
mirrors_blib : string list;
mirrors_clib : string list;
mirrors_nlib : string list;
}
The type of a remote specification. Each of the mirror fields is a list of URLs that can be fetched to get the library source code "mirrors_src"
, bytecode archive "mirrors_blib"
, C library archive "mirrors_clib"
, and nativecode archive "mirrors_nlib"
.
Implementations that perform fetching typically use the first URL in each mirror field that can be accessed.
A mirror field can be the empty list.
val pp : Stdlib.Format.formatter -> t -> unit
val empty : t
replace_abi ~target_abi spec
replaces all "@DKML_TARGET_ABI@"
strings in the mirrors with the value of target_abi
.
val parse_from_ocamldoc : string -> t option
parse_from_ocamldoc doc
parses the ocamldoc doc
.
The doc
is the contents of the "(**...*)"
attribute. An example of a doc
is:
Hi there! {[ `v1 [ `sec [`scheme "dkcoder"]; `blib ["https://gitlab.com/api/v4/projects/62703194/packages/generic/@DKML_TARGET_ABI@/2.1.4/@DKML_TARGET_ABI@-4.14.2-DkSDKFFI_OCaml-2.1.4-none.blib.zip"]; `clib ["https://gitlab.com/api/v4/projects/62703194/packages/generic/@DKML_TARGET_ABI@/2.1.4/@DKML_TARGET_ABI@-4.14.2-DkSDKFFI_OCaml-2.1.4-none.clib.zip"] ] ]}
Everything other than the first "{[ ... ]}"
ocamldoc block will be ignored. If there are no blocks, or if the ocamldoc block cannot be parsed, then None
is returned.