web icon indicating copy to clipboard operation
web copied to clipboard

Add a Dart-based WebIDL parser

Open ykmnkmi opened this issue 9 months ago • 3 comments

Currently, web_generator relies on the @webref/* JS libraries for parsing WebIDL definitions. This introduces a dependency on JS, introduces complexities in the build process, and slows down the development process.

ykmnkmi avatar Feb 17 '25 05:02 ykmnkmi

Any suggestions on how to improve this?

kevmoo avatar Feb 17 '25 19:02 kevmoo

I'm trying to work on variadic arguments, and each run requires compilation. I'm looking to implement it myself. There are cons, like keeping it updated, but I don't think the IDL format and web specs change that much.

ykmnkmi avatar Feb 18 '25 04:02 ykmnkmi

I'd be more worried we aren't handling corner cases correctly. I think reimplementing something like webidl2 is going to be quite a bit of effort and I would want it to be its own separate maintained package if we were to add it.

Note that we would still have to do something for MDN compat data even if we were to add this before we could move fully away from using any JS libraries.

srujzs avatar Feb 18 '25 23:02 srujzs