Skip to content
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

Support multiple template #149

Closed
wiiznokes opened this issue Oct 24, 2023 · 3 comments
Closed

Support multiple template #149

wiiznokes opened this issue Oct 24, 2023 · 3 comments

Comments

@wiiznokes
Copy link

I just want to call some function of Rust with Kotlin. Rn, the current template create a TauryActivity(?) and include dioxus by default.

@MarijnS95
Copy link
Member

I just want to call some function of Rust with Kotlin.

In that case you don't want to use xbuild, but rust-android-gradle from Mozilla or cargo-ndk. A simple example of the former can be found at https://github.com/MarijnS95/AndroidNativeSurface.

xbuild will do much more than simply cross-compiling your Rust project to a shared library for consumption in an existing Gradle + Kotlin project.

@wiiznokes
Copy link
Author

Thanks, this is simpler than i expected

@MarijnS95
Copy link
Member

@wiiznokes note that rust-android-gradle is abandoned and that there are some problems getting the built Rust library packaged into the APK consistently. I've spent some time on it once again to make my project(s, just added https://github.com/MarijnS95/AndroidVulkanInterop) work again, in both Groovy and Kotlin DSL:

mozilla/rust-android-gradle#118 (comment)
mozilla/rust-android-gradle#133 (comment)

Besides that I love this setup so far: it's all automated and can be used with a simple gradle installDebug from the command-line as well as the full build+run(+debug?) suite in Android Studio.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants