Skip to content
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

Bidirectional streaming between rust and flutter. #632

Closed
iamguid opened this issue Aug 16, 2022 · 4 comments
Closed

Bidirectional streaming between rust and flutter. #632

iamguid opened this issue Aug 16, 2022 · 4 comments
Labels
enhancement New feature or request wontfix This will not be worked on

Comments

@iamguid
Copy link

iamguid commented Aug 16, 2022

Now flutter_rust_bridge provides the ability to return a stream from a called function, this is implemented using the StreamSink primitive, but what if you need to pass a stream as an argument? I mean to do it like it is implemented in WebSocket, GRPCWeb, etc. Of course, to organize a bidirectional stream, you can call a function with the necessary arguments and return a stream, but it seems to me that it would be more useful to be able to both transfer a stream and return a stream.

I suggest to make 2 primitives

  1. rust -> dart streaming
  2. dart -> rust steaming

What do you think ?

@iamguid iamguid added the enhancement New feature or request label Aug 16, 2022
@welcome
Copy link

welcome bot commented Aug 16, 2022

Hi! Thanks for opening your first issue here! 😄

@fzyzcjy
Copy link
Owner

fzyzcjy commented Aug 16, 2022

  • rust->dart stream: already exists
  • dart->rust stream: for each stream.add we can simply call a rust function, this can also be easily wrapped

So seems that this would not be very hard.

Anyway feel free to PR for the feature you like!

@stale
Copy link

stale bot commented Oct 15, 2022

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the wontfix This will not be worked on label Oct 15, 2022
@stale stale bot closed this as completed Oct 22, 2022
@github-actions
Copy link
Contributor

github-actions bot commented Nov 5, 2022

This thread has been automatically locked since there has not been any recent activity after it was closed. If you are still experiencing a similar issue, please open a new issue.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Nov 5, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement New feature or request wontfix This will not be worked on
Projects
None yet
Development

No branches or pull requests

2 participants