-
Notifications
You must be signed in to change notification settings - Fork 1.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Use @webref/idl to maintain IDL files #2983
Comments
They won't work as they are, because web-sys relies on some non-standard attributes and things which aren't there in the original WebIDL files. For instance, If that issue could be solved, though, this seems like a good idea to me. |
Ah, right, I see a number of such attributes in the IDL definitions, including |
I took a look at the webidl-parsing code and a lot of those attributes aren't actually used. They're there because the webidls were initially imported from Firefox, and so we've inherited all their internal attributes. These are all of the attributes that are actually used:
So, it looks like It seems somewhat feasible to auto-generate |
Motivation
Automate the maintenance of IDL files used to generate WASM bindings by using the fragments maintained at the source in the webref project.
Proposed Solution
@tidoust and I maintain a list of automatically extracted IDL fragments from browser specifications as part of the webref project:
https://github.com/w3c/webref/tree/curated/ed/idl
(also available as an NPM package)
This list is already used e.g. in the Web Platform Tests project to maintain the authoritative list of IDL fragments to test browser against, and in TypeScript to maintain the relevant TypeScript class declarations.
Automating its use to populate https://github.com/rustwasm/wasm-bindgen/tree/main/crates/web-sys/webidls would simplify the maintenance of these files in the project (which seems entirely manual at this stage?)
The text was updated successfully, but these errors were encountered: