Closed abonander closed 6 years ago
As a temporary solution I've made honggfuzz
non-optional but it's not satisfactory.
Hi @abonander, I'm not a big fan of how features work in cargo because of this exact situation but anyway, there is 2 solutions:
cargo build
with an env var like this
HFUZZ_BUILD_ARGS="--features=honggfuzz" cargo hfuzz run honggfuzz_iter
This is not very nice looking or intuitive but I'm planning to find a better solution in the next major version of the CLI.
honggfuzz
dependancy conditional on the fuzzing
cfg tag like so:
[target.'cfg(fuzzing)'.dependencies]
honggfuzz = { version = "0.5"}
Please don't hesitate to reopen if you have any questions or suggestions!
I created a bin target for using Honggfuzz with my library (reverted on master because of this issue and also because
cargo-fuzz
works on WSL now):However, I cannot pass the
honggfuzz
feature to Cargo because thecargo-hfuzz
executable doesn't support it.