feat: add no-std support for insertion gate

Signed-off-by: Brandon H. Gomes <bhgomes@pm.me>
This commit is contained in:
Brandon H. Gomes 2022-11-04 16:26:22 -07:00
parent 5dfe1b412e
commit 9e33310ee7
No known key found for this signature in database
GPG Key ID: 773D44E6A904B222
6 changed files with 17 additions and 9 deletions

View File

@ -17,4 +17,3 @@ serde = { version = "1.0", default-features = false, features = ["derive"] }
[dev-dependencies]
rand = { version = "0.8.4", default-features = false, features = ["getrandom"] }

View File

@ -5,5 +5,9 @@ version = "0.1.0"
edition = "2021"
[dependencies]
anyhow = "1.0.40"
anyhow = { version = "1.0.40", default-features = false }
plonky2 = { path = "../plonky2", default-features = false }
[dev-dependencies]
plonky2 = { path = "../plonky2" }

View File

@ -1,3 +1,6 @@
use alloc::vec;
use alloc::vec::Vec;
use plonky2::field::extension::Extendable;
use plonky2::hash::hash_types::RichField;
use plonky2::iop::ext_target::ExtensionTarget;

View File

@ -1,3 +1,7 @@
use alloc::boxed::Box;
use alloc::string::String;
use alloc::vec::Vec;
use alloc::{format, vec};
use core::marker::PhantomData;
use core::ops::Range;
@ -317,18 +321,14 @@ impl<F: RichField + Extendable<D>, const D: usize> SimpleGenerator<F> for Insert
#[cfg(test)]
mod tests {
use core::marker::PhantomData;
use anyhow::Result;
use plonky2::field::goldilocks_field::GoldilocksField;
use plonky2::field::types::{Field, Sample};
use plonky2::gates::gate::Gate;
use plonky2::field::types::Sample;
use plonky2::gates::gate_testing::{test_eval_fns, test_low_degree};
use plonky2::hash::hash_types::HashOut;
use plonky2::plonk::config::{GenericConfig, PoseidonGoldilocksConfig};
use plonky2::plonk::vars::EvaluationVars;
use crate::insertion_gate::InsertionGate;
use super::*;
#[test]
fn wire_indices() {

View File

@ -4,6 +4,9 @@
#![allow(clippy::len_without_is_empty)]
#![allow(clippy::needless_range_loop)]
#![allow(clippy::return_self_not_must_use)]
#![no_std]
extern crate alloc;
pub mod insert_gadget;
pub mod insertion_gate;

View File

@ -12,4 +12,3 @@ plonky2 = { path = "../plonky2", default-features = false }
[dev-dependencies]
plonky2 = { path = "../plonky2", default-features = false, features = ["gate_testing"] }
rand = { version = "0.8.4", default-features = false, features = ["getrandom"] }