In #53, the crates in this workspace were rewritten to use const generics, for example the base Matrix became:
pub struct Matrix<const N_ROWS: usize, const N_COLS: usize, const N_ELEMENTS: usize> {
/// Elements of the matrix, stored in a fixed-size array.
///
pub elements: [Fq; N_ELEMENTS],
}
However, once the unstable Rust feature generic_const_exprs is stabilized, we'd be able to eliminate the N_ELEMENTS const generic parameter in favor of N_ROWS * N_COLS. Similarly for MDS matrices where we have a STATE_SIZE and STATE_SIZE_MINUS_1 parameter, we could eliminate STATE_SIZE_MINUS_1 in favor of using STATE_SIZE - 1.
In #53, the crates in this workspace were rewritten to use const generics, for example the base
Matrix
became:However, once the unstable Rust feature
generic_const_exprs
is stabilized, we'd be able to eliminate theN_ELEMENTS
const generic parameter in favor ofN_ROWS * N_COLS
. Similarly for MDS matrices where we have aSTATE_SIZE
andSTATE_SIZE_MINUS_1
parameter, we could eliminateSTATE_SIZE_MINUS_1
in favor of usingSTATE_SIZE - 1
.