w3f / rs-ec-perf

3 stars 3 forks source link

Define a trait access function instead of the trait LOG_TABLE to prevent compiler crashing #17

Open drskalman opened 3 years ago

drskalman commented 3 years ago

expression like let test_log = F2e16::LOG_TABLE[1]; makes the rust compiler crash. As a remedy one can replace that with let test_log = F2e16::get_log_table(1); till rust people figure out their bug. Same goes with EXP_TABLE etc.

drskalman commented 3 years ago

blocked by https://github.com/rust-lang/rust/issues/89334

drskalman commented 2 years ago

now I'm getting const generic error from cantor basis array. I'd change these from constant array to constant slice like in arkwork and retry.

```
error: internal compiler error: /rustc/68369a041cea809a87e5bd80701da90e0e0a4799/compiler/rustc_codegen_ssa/src/mir/constant.rs:42:20: encountered bad ConstKind after monomorphizing: Error(DelaySpanBugEmitted(()))

--> reed-solomon-novelpoly/src/field/field_util.rs:58:17 | 58 | let b = F::BASE[i+1];