zkcrypto / pairing

Pairing-friendly elliptic curve library.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Allow tests to be run on stable compiler

ebfull opened this issue · comments

Right now the benchmarks use unstable compiler APIs, so we need to disable them for the stable compiler.

As far as benchmarks go, it seems that the way to achieve the "stable test / nightly bench" split is to isolate the benchmarks under benches/. That would require @ebfull to be comfortable with having the benchmarks live a long* way from the code they bench.

Another alternative would be to add a default-off bench feature, and gate every single benchmark (or organise them into sub-modules and gate those). There's currently no built-in way to detect the use of nightly and enable features accordingly, so it would mean running cargo bench --features bench perpetually, unless cargo supports defining or overriding commands like npm does?

Moving the benchmarks into benches/ was pretty trivial, and I was able to retain the granularity by emulating the module structure.