mozilla / mozilla/rust-android-gradle

Automatically bundle `libc++_shared` in apk?

Open
#106 6 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Kotlin
Stars
1.3k
Forks
95
Avg merge
15m
Merged PRs (30d)
2

Description

I am currently migrating a project from using cargo-apk to a Gradle project, using rust-android-gradle.

The problem is that my project need to link to libc++_shared, but I am yet to find a compelling way to automatically bundle this library, that come with the NDK. I know that cargo-apk automatically bundles the library when linking to c++_shared, and, from searching, apparently gradle automatically also do this when using cmake or ndk-build.

Currently, I am simply copying the shared library to jniLibs, and searching how I could specify the original library in NDK to Gradle, but maybe rust-android-gradle should handle that?

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by comparing the existing rust-android-gradle behavior with cargo-apk's ndk-build/src/readelf.rs handling and Android's NDK C++ support guidance. Determine where the plugin could discover libc++_shared from the NDK and define done as automatically packaging the correct library in the APK without manual copying.

Written by the indexing model from the issue text.

Assessment

Tech stack
android, kotlin, rust
Domain
build-system, mobile
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.