I wanted to follow best practices and looked up how to benchmark tests in Rust.
The Rust Book discusses the use of the
test crate here, which requires nightly.
My first question is this: if I use it, then my entire crate would be nightly only, is this correct? So I may be inadvertently including nightly only features without realizing it?
Or can I turn this nightly feature on only when compiling tests but still retain the ability for the remainder of the crate to be compiled with stable? (it seems that
#![feature(test)] must precede
My second question is this: googling I found a number of references to test and nightly, including:
and links to alternatives such as criterion. As a long time npm user, I'm obviously trying to minimize the number of external (non-std) crates I use.
Is my understanding correct here that an unstable implementation has been languishing for years in the nightly channel but potentially better/external solutions are available only as external crates? What are the reasons for that?