Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

Automatically bundle `libc++_shared` in apk?

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

Nobody has claimed this yet.

Assessment

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

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.

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?

Dominant language
Kotlin
Stars
1.3k
Forks
95
PR merge metrics
No merged PRs in 30d

Getting set up

We have not checked this project's setup files yet. Start from its README, and see our first-contribution guide for the general steps.

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.

More from mozilla/rust-android-gradle

All issues in mozilla/rust-android-gradle

Similar issues

More Kotlin issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.