-
Maybe this is a stupid question, but I don't see this is mentioned in the documentation and I'm curious about the high level architecture for a typical application which is built upon the bridge. I'm trying to understand who controls the context of the application. That can help me make a better decision on modeling the architecture of my application Frontend-backend patternSelf-explanatory. There are two "runtimes" running at the same time. Flutter runtime is solely for rendering as well as receiving user input and pass it to the backend through any communication method (IPC/native function call, etc). The backend, which is a Rust CLI, handles the business logic as well as maintain the context/state of the application. Monolith with native library call? (Sorry for borrowing the naming from cloud computing if that causes confusion)In this case, there is not frontend backend thingy anymore. Everything is mixed up together. The rust library is solely handling the business logic and return it back to the Flutter runtime, and the context/state the application is managed by Flutter runtime anyway Is there a guideline that one application has to go one or the other, or it is pretty much the developer's call. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
Hi, flutter_rust_bridge does not enforce anything - it tries to let you cross language boundary seamlessly, so you are free to choose whatever you like or suits your specific scenario! Quote the README (folded so I guess you did not see it), which is a bit related:
Personally speaking, as long as your architecture is reasonable in the general sense (i.e. it looks acceptable if you remove words about languages), and there are good libraries / runtime support that you want to use (e.g. Flutter is not super good at writing complex CV algorithms while Rust is good at it), then it looks good to me. |
Beta Was this translation helpful? Give feedback.
Hi, flutter_rust_bridge does not enforce anything - it tries to let you cross language boundary seamlessly, so you are free to choose whatever you like or suits your specific scenario!
Quote the README (folded so I guess you did not see it), which is a bit related:
Personally speaking, as long …