VmBuilder

Trait VmBuilder 

Source
pub trait VmBuilder<E: StarkEngine>: Sized {
    type VmConfig: VmConfig<E::SC>;
    type RecordArena: Arena;
    type SystemChipInventory: SystemChipComplex<Self::RecordArena, E::PB>;

    // Required method
    fn create_chip_complex(
        &self,
        config: &Self::VmConfig,
        circuit: AirInventory<E::SC>,
        device_ctx: &EngineDeviceCtx<E>,
    ) -> Result<VmChipComplex<E::SC, Self::RecordArena, E::PB, Self::SystemChipInventory>, ChipInventoryError>;
}
Expand description

This trait is intended to be implemented on a new type wrapper of the VmConfig struct to get around Rust orphan rules.

Required Associated Types§

Required Methods§

Source

fn create_chip_complex( &self, config: &Self::VmConfig, circuit: AirInventory<E::SC>, device_ctx: &EngineDeviceCtx<E>, ) -> Result<VmChipComplex<E::SC, Self::RecordArena, E::PB, Self::SystemChipInventory>, ChipInventoryError>

Create a VmChipComplex from the full AirInventory, which should be the output of VmCircuitConfig::create_airs.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§

Source§

impl VmBuilder<GpuEngine<BabyBearPoseidon2HashScheme>> for SystemGpuBuilder

Source§

impl<SC, E> VmBuilder<E> for SystemCpuBuilder
where SC: StarkProtocolConfig, E: StarkEngine<SC = SC, PB = CpuBackend<SC>, PD = CpuDevice<SC>>, Val<SC>: VmField, SC::EF: Ord,