Skip to content

Commit 7e1dc32

Browse files
authored
fix(criterion): document the async API on docs.rs (#207)
* fix(criterion): document the async API on docs.rs - `Bencher::to_async` is gated behind the `async` feature, and docs.rs built the crate with default features only, so the async API was missing from the published docs. - Enable all async runtimes for the docs.rs build, like upstream Criterion. * docs(criterion): show feature requirements on docs.rs - Enable `doc_cfg` under `docsrs` so rustdoc labels feature-gated items, e.g. `Bencher::to_async` as "Available on crate feature `async` only". - Hide the internal `codspeed` cfg from the labels: it selects between the two `compat_criterion` modules, and would otherwise mark every item as "Available on non-codspeed only". * fix(criterion): build the async docs on current nightly - docs.rs builds with nightly, and `rustix` 0.37 no longer compiles there (`rustc_*` attributes are reserved). Both async docs builds pulled it in: `smol` 1 and the locked `async-std` 1.12 depend on `async-io` 1. - Bump the walltime fork to `smol` 2, as the compat crate already uses, and update `async-std` to 1.13 in the lockfile. Both now use `async-io` 2. - `smol` is not part of the public API: `SmolExecutor` only calls `smol::block_on`.
1 parent 0c6d629 commit 7e1dc32

4 files changed

Lines changed: 53 additions & 262 deletions

File tree

0 commit comments

Comments
 (0)