You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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, but wasm-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 and wasm-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:
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 weedle when necessary and otherwise #1950 tracks how we plan to track unstable WebIDL in the meantime.
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: