cunarist / rinf

Rust for native business logic, Flutter for flexible and beautiful GUI
MIT License
1.88k stars 65 forks source link

Receiving responses from rust is much more difficult in v6 #294

Closed milesegan closed 7 months ago

milesegan commented 7 months ago

Report

The API changed significantly in v6, making calling into rust simpler. However it seems like the v5 API feature of directly returning responses from rust is gone and retrieving responses from calls to rust is considerably more difficult now:

https://rinf.cunarist.com/frequently-asked-questions/#how-can-i-await-a-response

And the recommendation is:

Please note that it's recommended to use Flutter only to show widgets on the screen with rustSignalStream, 
while storing the state in Rust.

For an app that just needs to make a few calls to rust for things unavailable in dart this is a very large architectural change compared to v5 which made that use case fairly straightforward and is less at odds with a typical Flutter app using something like Bloc or Riverpod for most state management.

Do you have any suggestions for making the v6 API more ergonomic for an app with more minimal use of rust?

temeddix commented 7 months ago

Hi @milesegan , thanks for leaving your opinion.

There have been a lot of suggestions about this recently, including #292 . Version 6.7 will be published by tomorrow and it will provide the feature that you've requested. Thanks for your patience :)

milesegan commented 7 months ago

That's great to hear. Thanks very much for your quick response and for all your work on rinf!

temeddix commented 7 months ago

Sorry that it's taking long, looks like we should continue our disucssion at #292 to fix the design and actually write the code. If you're interested, please refer to that disussion.

I've been busy with my own schedules and commitment to Rinf has slowed down a bit...