rust-fuzz / honggfuzz-rs

Fuzz your Rust code with Google-developed Honggfuzz !
https://crates.io/crates/honggfuzz
Apache License 2.0
448 stars 40 forks source link

WIP: redesign arg parsing with structopt #52

Closed PaulGrandperrin closed 3 months ago

PaulGrandperrin commented 3 years ago

@drahnr, I played a little bit with how we could redesign the parsing of arguments. I shuffled most of the code in a module in order to be able to not pull structopt as a dependency to the usage of the crate as a library. Another solution could be to split the crate in two: honggfuzz-lib and honggfuzz-bin but I'd rather not.

PaulGrandperrin commented 3 years ago

I very much like the outcome of the structopt outline, I did the same but the structure I ended up with was slightly more complex since I tried to retain most of the initial semantics (i.e. keep the same set of commands).

I tried too at first but I wasn't satisfied with the result.. I managed to keep the current CLI stable for quite a long time, so I won't feel bad breaking it in order to improve it.

PaulGrandperrin commented 3 years ago

Regarding adding the feature to avoid splitting the crate into two. I can't quite follow why this is prefered over the crate split, could you please shed some light? Thanks!

I already partially answered in a previous comment, but I'm open to the idea and I agree that it would make sense. I just want things to be as easy as possible to the user.