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
web-sys: Added full Streams WebIDL #3046
Conversation
Sorry I don't know how best to update weedle for the webidl syntax here. Otherwise are all of these APIs supported in major browsers at this time? If so this seems fine to land with the webidl bits updated but otherwise I don't think this is the right time to land it. |
Just made a PR to weedle. I tried it on my local machine and it fixes the build. Regarding stability: this API is supported in all major browsers except for Safari (see, e.g., this support matrix). Would you rather it all be in |
Ok that seems reasonable enough to me to support 👍 I'd be happy to merge with weedle updated here |
It's actually pinned to weedle master, so it should work already. Could you rerun the CI?
|
I did that and it looks like it picked up the changes, but it appears that web-sys still needs regenerating. |
Ope, yup forgot about that. Pushed. |
It looks like CI may not be happy with the new crate? |
Didn't notice there were more files from the same API lying around. Fixed. |
Thank you for the quick turnaround! And also ofc thank you for maintaining this crate ❤️ |
There's a problem here - the WebIDL you pulled in doesn't include any of the This also happened when |
This reverts commit e8a499c.
Why this is needed
The Streams living standard is currently broken up into
enabled/ReadableStream.webidl
andunstable/{ReadableStreamBYOBReader.webidl, ReadableStreamDefaultReader.webidl, ReadableStreamGenericReader.webidl}
. There's two issues with this.ReadableStreamDefaultController
does not appear here, and it happens to be the only way to supportfetch()
progress in Safari (MDN currently lists it as unsupported but I've verified that it works on this site).ReadableStream
's API being more solidified than any other interface's.So my thought is to take all of the Streams standard and put it in
enabled/
. If you'd rather it all be inunstable/
that'd be okay too.Blocking problem
This currently fails to regenerate the Rust bindings with the following error:
I think it's because the
ReadableStream
interface is decorated with[Exposed=*, ...
, which the parser does not know how to parse. I don't know the best solution here. There is*
into whatever namespaces it expands into. This is probably the simplest.weedle
to accept the new syntaxUpdate toIt doesn't looks likeweedle2
, though I haven't checked if it accepts this syntaxweedle2
supports wildcards in extended attribute lists.