book/src/user_guide/known_limitations.md
There are currently a number of limitations to the use of Criterion.rs relative to the standard benchmark harness.
First, it is necessary for Criterion.rs to provide its own main function using the criterion_main macro.
This results in several limitations:
src/ directory as one might with the regular
benchmark harness.pub functions. External benchmarks, including those using Criterion.rs,
are compiled as a separate crate, and non-pub functions are not visible to the benchmarks.rlib.Criterion.rs cannot currently solve these issues. An experimental RFC is being implemented to enable custom test and benchmarking frameworks.