Skip to content

Commit

Permalink
Add CastF in the global thing
Browse files Browse the repository at this point in the history
  • Loading branch information
TlatoaniHJ committed Jan 10, 2025
1 parent 4cc7523 commit aa0364e
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion crates/sdk/src/config/global.rs
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ use openvm_ecc_circuit::{
use openvm_ecc_transpiler::EccTranspilerExtension;
use openvm_keccak256_circuit::{Keccak256, Keccak256Executor, Keccak256Periphery};
use openvm_keccak256_transpiler::Keccak256TranspilerExtension;
use openvm_native_circuit::{Native, NativeExecutor, NativePeriphery};
use openvm_native_circuit::{CastFExtension, CastFExtensionExecutor, CastFExtensionPeriphery, Native, NativeExecutor, NativePeriphery};
use openvm_pairing_circuit::{
PairingExtension, PairingExtensionExecutor, PairingExtensionPeriphery,
};
Expand Down Expand Up @@ -57,6 +57,7 @@ pub struct SdkVmConfig {
pub fp2: Option<Fp2Extension>,
pub pairing: Option<PairingExtension>,
pub ecc: Option<WeierstrassExtension>,
pub castf: Option<CastFExtension>,
}

#[derive(ChipUsageGetter, Chip, InstructionExecutor, From, AnyEnum)]
Expand Down Expand Up @@ -85,6 +86,8 @@ pub enum SdkVmConfigExecutor<F: PrimeField32> {
Pairing(PairingExtensionExecutor<F>),
#[any_enum]
Ecc(WeierstrassExtensionExecutor<F>),
#[any_enum]
CastF(CastFExtensionExecutor<F>),
}

#[derive(From, ChipUsageGetter, Chip, AnyEnum)]
Expand Down Expand Up @@ -113,6 +116,8 @@ pub enum SdkVmConfigPeriphery<F: PrimeField32> {
Pairing(PairingExtensionPeriphery<F>),
#[any_enum]
Ecc(WeierstrassExtensionPeriphery<F>),
#[any_enum]
CastF(CastFExtensionPeriphery<F>),
}

impl SdkVmConfig {
Expand Down Expand Up @@ -217,6 +222,9 @@ impl<F: PrimeField32> VmConfig<F> for SdkVmConfig {
if let Some(ref ecc) = self.ecc {
complex = complex.extend(ecc)?;
}
if let Some(ref castf) = self.castf {
complex = complex.extend(castf)?;
}

Ok(complex)
}
Expand Down

0 comments on commit aa0364e

Please sign in to comment.