use super::CpuProver;
use sp1_core_executor::SP1CoreOpts;
pub struct CpuProverBuilder {
core_opts: Option<SP1CoreOpts>,
}
impl Default for CpuProverBuilder {
fn default() -> Self {
Self::new()
}
}
impl CpuProverBuilder {
#[must_use]
pub const fn new() -> Self {
Self { core_opts: None }
}
#[must_use]
pub fn core_opts(mut self, opts: SP1CoreOpts) -> Self {
self.core_opts = Some(opts);
self
}
#[must_use]
pub fn with_opts(self, opts: SP1CoreOpts) -> Self {
self.core_opts(opts)
}
#[must_use]
pub async fn build(self) -> CpuProver {
CpuProver::new_with_opts(self.core_opts).await
}
}