Cargo Features

[dependencies]
criterion2 = { version = "2.0.0", default-features = false, features = ["stable", "codspeed", "async", "async_futures", "async_smol", "async_tokio", "async_std", "cargo_bench_support", "rayon", "document-features"] }
default = cargo_bench_support, rayon

These default features are set whenever criterion2 is added without default-features = false somewhere in the dependency tree.

stable = async_futures, async_smol, async_std, async_tokio
codspeed

Enables codspeed

Enables codspeed and colored

Affects criterion2::codspeed

async async_futures? async_smol? async_std? async_tokio?

Enables async/await support

Affects bencher::AsyncBencher, bencher::AsyncBencher

async_futures stable? = async

Enables built-in support for running async benchmarks on futures.

Enables executor of futures

Affects async_executor::FuturesExecutor

async_smol stable? = async, smol

Enables built-in support for running async benchmarks on smol.

Affects async_executor::SmolExecutor

async_tokio stable? = async, tokio

Enables built-in support for running async benchmarks on tokio.

async_std stable? = async, async-std

Enables built-in support for running async benchmarks on async-std.

Affects async_executor::AsyncStdExecutor

cargo_bench_support default

This feature _currently_ does nothing except disable a warning message, but in 0.4.0 it will be required in order to have Criterion.rs be usable outside of cargo-criterion.

Features from optional dependencies

In crates that don't use the dep: syntax, optional dependencies automatically become Cargo features. These features may have been created by mistake, and this functionality may be removed in the future.

rayon default

Enables rayon

Optional dependencies

futures async_futures?
smol async_smol?
tokio async_tokio?
async-std async_std?
document-features implicit feature

Enables document-features

document-features:

Extract documentation for the feature flags from comments in Cargo.toml