pub fn default_prover() -> Rc<dyn Prover>
Available on crate feature
client
and non-target_os="zkvm"
only.Expand description
Return a default Prover based on environment variables and feature flags.
The RISC0_PROVER
environment variable, if specified, will select the
following Prover implementation:
bonsai
: BonsaiProver to prove on Bonsai.local
: LocalProver to prove locally in-process. Note: this requires theprove
feature flag.ipc
: ExternalProver to prove using anr0vm
sub-process. Note:r0vm
must be installed. To specify the path tor0vm
, useRISC0_SERVER_PATH
.
If RISC0_PROVER
is not specified, the following rules are used to select a
Prover:
- BonsaiProver if the
BONSAI_API_URL
andBONSAI_API_KEY
environment variables are set unlessRISC0_DEV_MODE
is enabled. - LocalProver if the
prove
feature flag is enabled. - ExternalProver otherwise.