Example project demonstrating how to share Rust core logic between native Android and iOS mobile applications.
rust_android_ios is an example project that demonstrates how to build native Android and iOS mobile applications with shared business logic written in Rust. It solves the problem of code duplication across platforms by allowing developers to write core functionality once in Rust and integrate it into both Android and iOS apps. The project provides practical examples of Rust integration via FFI for iOS and JNI for Android.
Mobile developers who want to share business logic between Android and iOS apps while using Rust for its performance and safety benefits. It's particularly useful for teams considering Rust for mobile backend logic or exploring cross-platform code sharing strategies.
Developers choose this approach because it combines Rust's performance and safety with native mobile UI experiences, avoiding the limitations of full cross-platform frameworks. It provides flexibility to migrate between different frontend approaches while maintaining a single shared codebase.
Android / iOS app with shared Rust logic
Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.
Enables writing business logic once in Rust and reusing it across Android and iOS, reducing duplication as shown in the shared core example.
Maintains fully native user interfaces on each platform while sharing backend logic, ensuring optimal performance and platform-specific features.
Supports multiple integration methods like source code, precompiled binaries, or wrapped libraries, providing adaptability for different team workflows.
Facilitates easy migration between frameworks like Flutter or React Native and native apps, as highlighted in the philosophy section.
Requires extensive configuration such as NDK installation, cargo ndk, and specific Rust targets for Android and iOS, making onboarding cumbersome.
The project explicitly states it is 'looking for maintainers,' indicating potential instability and lack of long-term support.
Recommends using blocking APIs in the Rust core to simplify FFI/JNI interfaces, which restricts modern async patterns and may not suit all apps.
Android integration hides stdout/stderr in Logcat by default, complicating debugging compared to standard development practices.