From cd14cc10d6856bf2ab5c51c07d0212e329ee36e5 Mon Sep 17 00:00:00 2001 From: rhysd Date: Mon, 18 Jul 2022 20:30:44 +0900 Subject: [PATCH] separate section to run a fuzzer in CONTRIBUTING.md --- .cargo/config.toml | 2 +- CONTRIBUTING.md | 10 +++++++--- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/.cargo/config.toml b/.cargo/config.toml index 4d06f1c..638c996 100644 --- a/.cargo/config.toml +++ b/.cargo/config.toml @@ -1,3 +1,3 @@ [alias] -watch-check = ["watch", "-x", "check --examples --all-features --all --benches"] +watch-check = ["watch", "-x", "check --examples --all-features --workspace --benches"] watch-test = ["watch", "-x", "test --all-features -- --skip=src/lib.rs", "-w", "src"] diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 1d9926f..8e83986 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -33,15 +33,17 @@ cargo clippy --all-features --examples cargo fmt -- --check ``` -To run fuzzer: +If you use [cargo-watch][], `cargo watch-check` alias is useful to run checks automatically on writing to a file. -[cargo-fuzz](https://github.com/rust-fuzz/cargo-fuzz) is necessary. +## Running a fuzzer + +To run fuzzing tests, [cargo-fuzz][] is necessary. ```sh cargo +nightly fuzz run edit ``` -## Run benchmark +## Running benchmark suites Benchmarks are available using [Criterion.rs][criterion]. @@ -56,4 +58,6 @@ cargo bench --benches See [README in bench/](./bench/README.md) for more details. +[cargo-watch]: https://crates.io/crates/cargo-watch +[cargo-fuzz]: https://github.com/rust-fuzz/cargo-fuzz [criterion]: https://github.com/bheisler/criterion.rs