-
Notifications
You must be signed in to change notification settings - Fork 5
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Feat/uniffi implementation #12
Conversation
a4685f3
to
4da2f6c
Compare
Appears to be a little more complicated than I initially figured due to mozilla/uniffi-rs#2000 |
@Mydayyy I created a PR to support conditionally using uniffi mozilla/uniffi-rs#2086 Feel free to temporarily import it until they merge it upstream. |
Cheers, I'll check it out! Thanks |
c3a9b35
to
a5f082b
Compare
Thanks to the awesome work of the uniffi people, conditional constructors are now merged to main and released in 0.28, so this should be unblocked and I will continue to iterate on it |
conditionally scaffolding still pending
a5f082b
to
5303e93
Compare
Greetings @nain-F49FF806, I hope you've been well. I did some testing with the implementation of the uniffi bindings in this branch and I managed to compile the sharepaste app with a small change. Since the uniffi-bindings would now be opt-in, one has to enable a feature flag for the compilation:
(As seen in the fork here: Mydayyy/sharepaste.oo-uniffi-test@f8a5841) I am not sure if there is a better way, I did not find any inside the documentation of cargondk. Because with that, the feature flag is technically enabled for all libraries that cargondk builds (in this case Regarding the tests: |
Greetings, Thanks for adding conditional activation for the uniffi bindings code. And for trying out the changes made here with sharepaste app! I have tried your fork locally, and it is indeed working. The app does seem to run properly on my device.
Yes. That is currently a limitation of cargo-ndk-android-gradle. I do not see a likelihood of more fine-grained options being implemented anytime soon, as it seems to not be actively maintained now. There is a workaround / better way (not sure if it's the best way), but it's a bit more involved. I am considering moving to a one rust library per android module structure [1]. With each module having a separate For now, the solution you have used I feel is apt. Also, the |
Regarding running the tests, I did a search, and it looks someone else have also tripped on a similar looking issue. Do you think it's the same issue? They don't seem to have taken the deep dive and discovered the root cause like you have here (nice finding :), but the linked discussion seems to have a workaround. In any case, having the uniffi feature in the main branch (behind feature flag) would be useful. |
Thank you for the feedback! I will proceed to merge this during the weekend!
It very much appears so, even though the initial issue is a bit light on information. But the workaround they ended up with is actually something I tried as well to trace the issue down and it would fix it. I did decide against that though because it would be an annoyance to keep editing the Cargo.toml and modify the default features every time. |
ToDo: