Closed bookshiyi closed 1 year ago
This is correct. Ideally I'd want to use dylib on all platforms, but unfortunately it is not possible right now, at least on iOS.
There are two ways for cargokit (that I can think of) to do dynamic libraries on iOS, unfortunately both of them are flawed:
Run the pod build script after framework build, replace the pod framework dylib with rust built code. The problem with this is that Xcode will not notice this and after rebuild it will not copy the updated framework to destination app bundle.
Put rust dylib inside cocoa pod framework, update dylib install name and link it with framework. This would work in theory, unfortunately on iOS frameworks are not allowed to contain secondary dylibs (that is dylib other than ExecutableName declared in Info.plist). So this would get rejected during AppStore submission.
While 2. would technically work on macOS, I'm not sure it is it's worth the inconsistency if we can't do it on iOS anyway.
@knopp Thanks for your reply.
How do you think that add detailed documents such as startup, roadmap, architecture to this project?
There is a tutorial available here:
https://matejknopp.com/post/flutter_plugin_in_rust_with_no_prebuilt_binaries/
I should probably add it to the README. Other than that, any documentation PRs are welcome :)
Hi, @knopp, Thank you for providing this great project. I try to understand the specific implementation of cargokit on different platforms:
Is this a reasonable summary?
btw: The name of file
build_android.rs
and functionbuild_android()
not wasbuild_gradle
, is there any special consideration for doing this? How do you think that change namebuild_android
tobuild_gradle
without any logic changes?(like #5 )