| 1 | (************************************************************************) |
| 2 | (* * The Rocq Prover / The Rocq Development Team *) |
| 3 | (* v * Copyright INRIA, CNRS and contributors *) |
| 4 | (* <O___,, * (see version control and CREDITS file for authors & dates) *) |
| 5 | (* \VV/ **************************************************************) |
| 6 | (* // * This file is distributed under the terms of the *) |
| 7 | (* * GNU Lesser General Public License Version 2.1 *) |
| 8 | (* * (see LICENSE file for the text of the license) *) |
| 9 | (************************************************************************) |
| 10 | |
| 11 | type worker = { |
| 12 | package : string; |
| 13 | basename : string; |
| 14 | } |
| 15 | |
| 16 | (** Find the executable for the given worker. [init] must have been called. |
| 17 | [byte] defaults to whether the current executable is byte compiled. *) |
| 18 | val get_worker_path : worker -> string |
| 19 | |
| 20 | type opts = { debug_shim : bool } |
| 21 | |
| 22 | val parse_opts : string list -> opts * string list |
| 23 | |
| 24 | (** Initialize environment and search paths. *) |
| 25 | val init : opts -> string list -> unit |
| 26 | |
| 27 | (** Returns whether there are queries in the argument list, and if there are print their output. |
| 28 | Does not handle PrintHelp queries. *) |
| 29 | val try_run_queries : opts -> string list -> bool |
| 30 | |
| 31 | (** On windows [Unix.execv] creates a new process and exits this one. |
| 32 | This confuses dune into thinking we are done, |
| 33 | so instead we create_process and wait for it. *) |
| 34 | val exec_or_create_process : string -> string array -> 'a |