Description
During the work on #247 , @tschneidereit noted that it would be good to do a couple things:
It'd be nice if we could, on a best-effort basis, detect usage of FetchEvent when auto-disabling support for it. That'd be possible using oxc, but somewhat gnarly. Basically, it'd require walking the AST, finding all function calls to the identifier addEventListener, and checking if the first argument is the string literal "fetch". Obviously there are ways to create both false positives and negatives, but those are unlikely enough for a warning not to be a problem, I think.
The more important thing is that I thought we had agreed to have the parsing happen in Rust instead of JS. That'd both better support using the splicer as a Rust dependency, and be faster.
It would be great to address both of these issues.
[EDIT] After a little bit of discussion we definitely don't need to move the current source code processing over to Rust (currently it's all done on the JS side) as part of this, so we can ignore the second bit