-
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
Support for WebIDL modules? #1740
Comments
AFAIK there hasn't been a lot of discussion around this, but adding support seems reasonable! FWIW we currently only stabilize stage 3 and beyond web APIs in web-sys but we have a not yet implemented plan to land stage 2 and below APIs in web-sys, so to fully land everything if the proposals here aren't stage 3 yet then that'll also need to be implemented before putting everything in web-sys. |
I'm going to close this for now because we can support this in |
Has there been a discussion about what it would take to modify
wasm-bindgen-webidl
to support potential WebIDL modules (see WICG/kv-storage#68 and the issues mentioned there) or something that would provide similar functionality?I've been experimenting with making webidls for at least parts of the node and electron apis (because doing it with wasm-bindgen is too much work) but it doesn't seem possible to do properly without namespaced interfaces or modules.
The
LegacyNamespace
attribute on interfaces could probably be used as a (temporary!) workaround in some cases, butwasm-bindgen-webidl
doesn't support it, and adding support for it would require at least some of the same machinery as for modules.I've been poking around the source for
weedle
andwasm-bindgen-webidl
trying to get an idea for how they work to see if I could make the modifications myself and I think I'm starting to understand what's going on.It looks like the changes could be extensive though since most of the machinery in
first_pass.rs
deals with names as&str
(potentially within a non-nested namespace) and would need to be generalized to handle qualified names instead.If there is interest in supporting this functionality now (either through experimental support for parsing webidl modules per the PR, or supporting
LegacyNamespace
, or some other interface) I'd be willing to try and implement it given some guidance.The text was updated successfully, but these errors were encountered: