-
|
I would love to hear the community's thoughts (and hopefully a recommendation from the maintainers) on the best practices for saving files and handling databases. The Core QuestionWhen dealing with local storage (saving files, using SQL-like databases, etc.), should the logic be handled primarily from the Flutter (Dart) side or the Rust side? Specific ScenariosI can see arguments for both sides, but I'm unsure of the "canonical" approach for this architecture:
Path ManagementThis brings me to the second part of the question: Finding the right paths. Mobile operating systems (especially iOS and Android) have strict sandboxing rules and specific directories for persistent data vs. cache.
ProposalI think it would be incredibly helpful if the documentation included a small "Architecture Recommendation" or "Best Practices" section regarding data persistence. A short guide on "Where to store your data" would save a lot of trial and error for new users. Thanks in advance for the guidance and for the great work on the project. Long time fan here. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
|
Hi, thank you for your participation :) As the documentation states, Rinf expects the whole business logic to be written in Rust, while Flutter serves only as the UI layer. Therefore it can be advised to put database connections as member vars of Rust "actors" or "tokio tasks". To get platform directories, you can use dedicated crates such as These are my thoughts on your questions regarding using Rinf, but any opinions from the community is appreciated! |
Beta Was this translation helpful? Give feedback.
Hi, thank you for your participation :)
As the documentation states, Rinf expects the whole business logic to be written in Rust, while Flutter serves only as the UI layer.
Therefore it can be advised to put database connections as member vars of Rust "actors" or "tokio tasks".
To get platform directories, you can use dedicated crates such as
sysdirs.These are my thoughts on your questions regarding using Rinf, but any opinions from the community is appreciated!