syn icon indicating copy to clipboard operation
syn copied to clipboard

`Arbitrary` support to allow for downstream fuzzing

Open ejmount opened this issue 1 year ago • 0 comments

Hi,

A project I'm working on involves a lot of codegen with proc macros, and I've been looking into whether I can use fuzzing to catch issues with, e.g. using quote with only-sometimes-valid substitutions. However, AIUI, fuzzing effectively requires being able to generate structured inputs, in this case generating syn nodes from fuzzing. Would this be welcome as an addition, or has there been any previous issues with the idea I should be aware of?

To be clear, my current plan would be to build support for the Arbitrary crate behind an appropriate feature flag, and submit it as a PR. (It would work almost as well as a separate crate, but being within syn would mean compound types can derive support) I'm quite happy to do this myself, this post is mainly to check there's no obstacles I'm going run into before I've invested a large amount of time working on this.

Please also let me know if you think a different fuzzing infrastructure would be more appropriate and I'll be sure to look into it, or if you have any other feedback on the idea

Thanks

ejmount avatar Jul 11 '23 22:07 ejmount