# Integrating Rust with Android for Cross-Platform Code Reuse

DevFeed: [Integrating Rust with Android for Cross-Platform Code Reuse](<https://devfeed.tech/articles/rust-cross-platform-the-android-part-34674.md>)

Original publisher: [Read original article](<http://fernandocejas.com/blog/engineering/2023-07-27-rust-cross-platform-android/>)

Author: Fernando Cejas (me@fernandocejas.com)

Published: 2023-07-27T00:00:00Z

Content type: tutorial

Language: en

Sources: [Fernando Cejas Blog](<https://devfeed.tech/sources/fernando-cejas-blog.md>)

Topics: [Rust](<https://devfeed.tech/topics/rust.md>), [Android](<https://devfeed.tech/topics/android.md>), [cross-platform](<https://devfeed.tech/topics/cross-platform.md>), [Development](<https://devfeed.tech/topics/development.md>), [Android Studio](<https://devfeed.tech/topics/android-studio.md>), [Encryption](<https://devfeed.tech/topics/encryption.md>)

Tags: [android](<https://devfeed.tech/tags/android.md>), [android-development](<https://devfeed.tech/tags/android-development.md>), [android-studio](<https://devfeed.tech/tags/android-studio.md>), [architectures](<https://devfeed.tech/tags/architectures.md>), [code](<https://devfeed.tech/tags/code.md>), [compilation](<https://devfeed.tech/tags/compilation.md>), [cross-platform](<https://devfeed.tech/tags/cross-platform.md>), [culture](<https://devfeed.tech/tags/culture.md>), [development](<https://devfeed.tech/tags/development.md>), [encryption](<https://devfeed.tech/tags/encryption.md>), [engineering](<https://devfeed.tech/tags/engineering.md>), [infrastructure](<https://devfeed.tech/tags/infrastructure.md>), [ios](<https://devfeed.tech/tags/ios.md>), [java](<https://devfeed.tech/tags/java.md>), [kotlin](<https://devfeed.tech/tags/kotlin.md>), [linux](<https://devfeed.tech/tags/linux.md>), [open-source](<https://devfeed.tech/tags/open-source.md>), [programming](<https://devfeed.tech/tags/programming.md>), [python](<https://devfeed.tech/tags/python.md>), [rust](<https://devfeed.tech/tags/rust.md>), [scala](<https://devfeed.tech/tags/scala.md>), [software](<https://devfeed.tech/tags/software.md>), [software-development](<https://devfeed.tech/tags/software-development.md>), [web-development](<https://devfeed.tech/tags/web-development.md>)

## AI overview

A tutorial on integrating Rust with an Android application for cross-platform code reuse. It covers project structure, Rust compilation, Android CPU architecture libraries, JNI integration, Android SDK and NDK requirements, and an example involving encryption and decryption.

## Source excerpt

In this journey, we will go through the **process, infrastructure and architecture** on how we can integrate **Rust in our Android Project** in a **cross-platform development** way. Topics like **JNI** and **NDK** are also covered, plus some **anti-patterns** and **real use cases/scenarios**.