diff --git a/plonky3/Cargo.toml b/plonky3/Cargo.toml index d9d52be780..1c66ed9b77 100644 --- a/plonky3/Cargo.toml +++ b/plonky3/Cargo.toml @@ -22,6 +22,8 @@ nightly-features = [ "p3-mersenne-31/nightly-features", "p3-poseidon2/nightly-features", ] +# As a guest in powdr, use accelerated machines. +powdr-accel = [] [dependencies] powdr-ast.workspace = true diff --git a/plonky3/src/params/poseidon2/goldilocks/mod.rs b/plonky3/src/params/poseidon2/goldilocks/mod.rs index 67d157e3eb..b8d3c436e3 100644 --- a/plonky3/src/params/poseidon2/goldilocks/mod.rs +++ b/plonky3/src/params/poseidon2/goldilocks/mod.rs @@ -1,13 +1,14 @@ -#[cfg(not(all(target_os = "zkvm", target_arch = "riscv32")))] +#[cfg(not(feature = "powdr-accel"))] mod software_impl; -#[cfg(not(all(target_os = "zkvm", target_arch = "riscv32")))] +#[cfg(not(feature = "powdr-accel"))] pub use software_impl::*; -#[cfg(all(target_os = "zkvm", target_arch = "riscv32"))] +#[cfg(feature = "powdr-accel")] mod powdr_accel_impl; -#[cfg(all(target_os = "zkvm", target_arch = "riscv32"))] +#[cfg(feature = "powdr-accel")] pub use powdr_accel_impl::*; + use lazy_static::lazy_static; use p3_goldilocks::Goldilocks; use p3_poseidon2::poseidon2_round_numbers_128;