Replies: 1 comment 4 replies
-
Yes, your sample code looks reasonable. Just one thing: frb does not yet support generics. So maybe use Rust's macros (e.g. https://doc.rust-lang.org/rust-by-example/macros.html) to get rid of generics.
Thank you for you kindness and happy to hear it works great for you! I do open source primarily because I have been helped by so many open source libraries thus I want to contribute and help other developers, and also because I enjoy coding. |
Beta Was this translation helpful? Give feedback.
-
Hi,
I've been using using flutter_rust_bridge for a while now and it's been an absolute blast. I can write my rust code normally and the just create a beautiful ui in flutter without any major headaches.
But I've hit a bit of a roadblock: my library returns different kinds of tokio channel receivers - which I would like to listen to in dart.
While there is the Streamsink, I didn't yet figure out how to easily convert those to a Streamsink, so you have any tips?
An example would be the
tokio::sync::broadcast::Receiver<T>
type which has this function:I was thinking I could do something akin to this?
Do you have any tips?
PS: @fzyzcjy Do you accept donations? This project is really awesome and I'd love to support it.
Beta Was this translation helpful? Give feedback.
All reactions