pub fn default_executor() -> Rc<dyn Executor>
Expand description

Return a default Executor based on environment variables and feature flags.

The RISC0_EXECUTOR environment variable, if specified, will select the following Executor implementation:

  • local: [local::LocalProver] to execute locally in-process. Note: this is only available when the prove feature is enabled.
  • ipc: ExternalProver to execute using an r0vm sub-process. Note: r0vm must be installed. To specify the path to r0vm, use RISC0_SERVER_PATH.

If RISC0_EXECUTOR is not specified, the following rules are used to select an Executor:

  • [local::LocalProver] if the prove feature flag is enabled.
  • ExternalProver otherwise.