ocaml_plugin

Automatically build and dynlink OCaml source files
IN THIS PACKAGE
Module Ocaml_plugin . Compiler . S . Load . Expert
val compile_ocaml_src_files_into_cmxs_file : Dynloader.dynloader -> string list -> output_file:string -> unit Async.Deferred.Or_error.t

This compiles the source files into cmxs file, but does not execute the plugin toplevel. The resulting cmxs file can be loaded by the *load_cmxs_file function below either from within the same process or other processes which share the same executable. If compile succeeds, it returns Ok and write the compiled cmxs file into output_file (may override existing file), otherwise it returns Error and won't write to output_file at all.

val load_cmxs_file : string -> t Core.Or_error.t Async.Deferred.t
val blocking_load_cmxs_file : string -> t Core.Or_error.t

blocking_load_cmxs_file will return an error if called after the async scheduler has been started.