Module Nativelib

This file provides facilities to access OCaml compiler and dynamic linker, used by the native compiler.

val output_dir : string
val get_load_paths : (unit -> string list) Stdlib.ref
val load_obj : (string -> unit) Stdlib.ref
val get_ml_filename : unit -> string * string
val compile : string -> Nativecode.global list -> profile:bool -> string

compile file code ~profile will compile native code to file, and return the name of the object file; this name depends on whether are in byte mode or not; file is expected to be .ml file

val compile_library : Names.DirPath.t -> Nativecode.global list -> string -> unit

compile_library lib code file is similar to compile file code but will perform some extra tweaks to handle code as a Coq lib.

val call_linker : ?⁠fatal:bool -> Environ.env -> prefix:string -> string -> Nativecode.code_location_updates option -> unit
val rt1 : Nativevalues.t Stdlib.ref
val rt2 : Nativevalues.t Stdlib.ref
val get_library_native_symbols : Names.DirPath.t -> Nativevalues.symbols

Strictly for usage by code produced by native compute.