Open temeddix opened 1 year ago
That is the point of absolute path for crates? Can you provide an example?
If a Flutter plugin has Rust crates in its filetree, then relative path is enough. However, if a Flutter plugin needs to use Rust crates OUTSIDE the plugin foldertree, absolute path should be provided. Actually, this is what we're doing at https://github.com/cunarist/rust-in-flutter
I don't really understand your project structure. You have rust_in_flutter package, but the native code lives inside the example that depends on rust_in_flutter? Why do you structure it like that?
The example
folder in Rust-In-Flutter repo is not really for running code. It has two purposes:
dart run rust_in_flutter template
commandSo example/native
does not really run directly. Rather it gets 'copied' to the Flutter app. The copied template in the dependent is then used by Rust-In-Flutter.
If this issue is hard to be accepted, that's okay, I appreciate it :)
I'd keep this open for now. I'm currently rewriting the Rust part of cargokit into dart (to optionally support prebuilding binaries and it will also be handy once build.dart support lands in pub) so there are too many moving pieces right now. Once the dust settles I can revisit this.
The way I see this instead of concatenating the path in CMake/Gradle it would be passed as it was specified into the build_tool which would then do the right thing.
Currently, we cannot provide absolute path to Cmake and gradle. For cocoapods, it is possible. Can this be improved either with direct commit or PR?