IronCoreLabs / IronCoreLabs/gridiron
constant_unsigned_array31 macro needs to be macro exported
- Dominant language
- Rust
- Stars
- 18
- Forks
- 4
- PR merge metrics
- No merged PRs in 30d
Description
The `fp31!` macro is used to define a new field where you can specify the number of limbs (among other things).
```rust
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
```rust
#[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]`.
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.