Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

constant_unsigned_array31 macro needs to be macro exported #55

Open
M-ArafatZaman opened this issue Jul 21, 2024 · 1 comment
Open

constant_unsigned_array31 macro needs to be macro exported #55

M-ArafatZaman opened this issue Jul 21, 2024 · 1 comment

Comments

@M-ArafatZaman
Copy link

The fp31! macro is used to define a new field where you can specify the number of limbs (among other things).

constant_unsigned_array31! { 9, 16 }

implements the ConstantUnsignedArray31 trait for "limbs" of length 9 and 16, the two provided by the crate Fp256 and Fp480.

This issue can be solved by exporting the macro that implements the ConstantUnsignedArray31 trait like this

#[macro_export]
macro_rules! constant_unsigned_array31 { ($($N:expr),*) => { $(
...

and then allowing the end user to implement the trait themselves for their desired limbs.

Or, when using the fp31! macro to create a field of n limbs, use the constant_unsigned_array31! macro within the macro to implement the trait for [u32; $n].

@skeet70
Copy link
Member

skeet70 commented Oct 3, 2024

We don't have a need for this in our use cases, but we'd welcome a PR

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants