Replies: 2 comments 3 replies
-
IMHO this should work well, given that frb itself is only a thin code generator and runtime, and never requires how that folder looks like. I also use multi crates in my own app. However, I am wondering whether changing the template it good or not, because it makes it a bit more complicated and new users may need more time to understand. Surely, they get more powerful template as well :) /cc @Desdaemon who wrote the helpful templates - what do you think? |
Beta Was this translation helpful? Give feedback.
-
Also I was curious how this repository https://github.com/Desdaemon/flutter_rust_bridge_template is related to this one. According to the official docs, we are encouraged to start a new project from this template, but since the author was different I got confused. It's Now I see that you two are cooperating, but I just wanted to say that it was a little misleading :) |
Beta Was this translation helpful? Give feedback.
-
Currently, the folder structure goes like this:
[lib]
)However, it would be so nice if the folder structure can be like this:
[workspace]
)[lib]
)[lib]
)[lib]
)This is basically because for bigger projects, single Rust crate is not enough. Dynamic library files(
.dll
,.so
) are usually multiple instead of being just one in actual softwares.Take a look at https://github.com/AppFlowy-IO/AppFlowy. Although this project doesn't rely on Flutter Rust Bridge, they do make use of multiple Rust crates in their own way.
I've already applied this idea to our repository https://github.com/cunarist/app-template and is working well. I only modified CMake files for Windows and Linux and created some Python scripts in
automate
folder to do this.corrosion
CMake package already supports importing and linking multiple Rust crates. I believe this transition would be possible if the maintaner decides to do so.I thought about making a pull request but since this involves changing contents in CMake files, FRB Dart package, documentations and so on, I wanted to ask if this idea would be allowed to go into master.
Beta Was this translation helpful? Give feedback.
All reactions