book icon indicating copy to clipboard operation
book copied to clipboard

The rust-fuzz book Coverage page should direct 'cargo-binutils' installation

Open cameronelliott opened this issue 5 months ago • 1 comments

First, both rust fuzz and the book are freaking awesome! Thanks for creating both!!

As an outsider, I wanted to share some experiences which might help improve the book, and others running into similar issues.

I ran through the fuzzing coverage tutorial on two different systems: macos and linux.

I ran into two issues going though the tutorial here: https://rust-fuzz.github.io/book/cargo-fuzz/coverage.html One I will mention in another issue. This issue is about the unexplained need to have the cargo-binutils subcommand installed.

If you have done code coverage outside of fuzzing, you might already have this installed. But if you haven't already done cargo install cargo-binutils it's not going to be obvious how to get cargo cov .. working.

Both myself, and another end-user accidently tried cargo install cargo-cov to setup the cargo cov subcommand as needed on this page: https://rust-fuzz.github.io/book/cargo-fuzz/coverage.html

The other person who and the problem and filed an issue is here: https://github.com/rust-fuzz/book/issues/39 And they did not figure out that they needed cargo-binutils, and not cargo-cov.

It's easy to go down the wrong path. I asked an LLM, and then tried cargo search cargo-cov, and installed cargo-cov, which is all wrong!

But cargo-cov is not going to install the correct subcommand. And it's very confusing

The coverage tutorial page should explicitly explain the need for cargo install cargo-binutils, and not cargo install cargo-cov or another sub-command

let me know if a PR is desired

cameronelliott avatar Jan 28 '24 01:01 cameronelliott

Good catch! Yeah a PR would be welcome though one of us will get around to fixing it ourselves eventually if not.

Manishearth avatar Jan 28 '24 01:01 Manishearth