From 740381cfec44609be0fb9c352b1ccdd65daba45d Mon Sep 17 00:00:00 2001 From: Ohad Agadi Date: Mon, 25 Nov 2024 12:56:31 +0200 Subject: [PATCH] macro export --- crates/prover/src/constraint_framework/mod.rs | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/crates/prover/src/constraint_framework/mod.rs b/crates/prover/src/constraint_framework/mod.rs index fc7bb91d3..9bbf05402 100644 --- a/crates/prover/src/constraint_framework/mod.rs +++ b/crates/prover/src/constraint_framework/mod.rs @@ -243,25 +243,26 @@ impl<'a, F: Clone, EF: RelationEFTraitBound, R: Relation> RelationEntr } } +#[macro_export] macro_rules! relation { ($name:tt, $size:tt) => { #[derive(Clone, Debug, PartialEq)] - pub struct $name(crate::constraint_framework::logup::LookupElements<$size>); + pub struct $name($crate::constraint_framework::logup::LookupElements<$size>); #[allow(dead_code)] impl $name { pub fn dummy() -> Self { - Self(crate::constraint_framework::logup::LookupElements::dummy()) + Self($crate::constraint_framework::logup::LookupElements::dummy()) } - pub fn draw(channel: &mut impl crate::core::channel::Channel) -> Self { - Self(crate::constraint_framework::logup::LookupElements::draw( + pub fn draw(channel: &mut impl $crate::core::channel::Channel) -> Self { + Self($crate::constraint_framework::logup::LookupElements::draw( channel, )) } } - impl> - crate::constraint_framework::Relation for $name + impl> + $crate::constraint_framework::Relation for $name { fn combine(&self, values: &[F]) -> EF { values