-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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 ReadableStreams in services::fetch #1207
Comments
One possible way to solve this is to raise an issue in the |
From the comments in the linked PR, it seems like web-sys is blocked by that the Streams spec doesn't currently use WebIDL. But I agree it would be best if we could find a solution with the web-sys team |
I feel like this is something that the Rust Wasm Working Group might be better placed to address, but we could try and put something together to work as an intermediary solution. |
Yep I agree and that is also my idea. |
And if we hand write the js bindings 1-to-1, it probably wont be hard to shift to whatever Wasm Working Group comes up with. edit: I hope |
WIP branch https://github.com/nicklaswj/yew/tree/readablestreams nothing works yet though |
Looks cool. |
I noticed this issue was linked to rustwasm/wasm-bindgen#1761, and I see you've started building your own wrappers to work with JavaScript If you're interested: I've just published a crate which provides such wrappers, and supports converting from and into Rust If you're not interested, that's fine too. (I hope I didn't disturb your conversation too much...) |
Oh nice thanks for the heads up. I'll take a look :D |
@MattiasBuelens It really looks good! |
I think this can now be closed as the fetch service has been removed in #1842 |
Currently services::fetch:: does not support ReadableStreams, which would allow the user to read the body in byte chunks. However web-sys does currently not really support ReadableStreams (see rustwasm/wasm-bindgen#1761), so in the meantime we will have to make a solution that uses handwritten bindings.
I'm still not exactly sure what the best yew API would look like, so any suggestions are very welcome 😄
I have no code to show yet - but I'll link to it when I do.
The text was updated successfully, but these errors were encountered: