No? The dependencies will be compile-time. Your context is a crate that works on token streams, so it will have compile-time dependencies like syn. On the other hand, the generated harness will have dependencies like libfuzzer-sys and whatever we use for output formatting. These are different things. Your harness has no need for syn, and your harness-generation-macro has no need for libfuzzer-sys.
For example, the thing that generates the test harness is libsyntax, but the harness itself has dependencies in libtest. Different things.
It’s necessary because libFuzzer replaces main and takes over the program. It feels weird to split the codegen across cargo flags and a proc macro; it would make more sense to provide a turn_off_main() function to the proc macro but this is exactly the kind of API surface expansion I was worried about and hence I proposed a whole-crate proc macro. I’m fine with not exposing this functionality and instead having cargo-fuzz users write it explicitly, but I’m not fine with putting codegen modifying flags in Cargo.toml.
oh it’s the name of the annotated function. I hadn’t picked up on that. My bad. Will swap back; though I’ll use attributes not with_attrs to match proc_macro.
It’s “post build” in the CI pipeline sense; tests/benches/fuzzing are considered “post build” because you do them after a successful build.
Yes, under the hood it is a different way of executing things but I suspect that’s not the model people have of cargo test and cargo bench.
Alignment with proc macros, which do the same thing. It also signals to cargo that this crate should not be cross compiled (otherwise you get weird errors).
Yeah, I did that bit in a hurry. My bad. I forgot the “not sufficient” part.
You misunderstand, I removed the ability to specify multiple folders for a context, not multiple contexts for a folder. The ambiguity is that if you have the same file in both you no longer can pick one.
I also didn’t find it necessary, really, if you really need multiple folders using the same context import the context twice. And I don’t think you’d really need that.