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

.so does not end up in .apk if project inside workspace

Open
#109 10 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

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

Research direction

Reproduce the setup with android_project, libsomething, libsomething2, and the workspace Cargo.toml, using the cargo configuration shown in the issue. Compare the workspace target location with the rustJniLibs folder and the working android/app/build.gradle example. Done means the selected libsomething.so is copied into rustJniLibs without compiling unrelated workspace members.

Written by the indexing model from the issue text.

Description

If you have

android_project
libsomething
libsomething2
Cargo.toml

and Cargo.toml happens to be a workspace for libsomething and libsomething2, then

cargo {
    module  = "../../../libsomething"
    libname = "something"  
    verbose = true
    apiLevel = 21
    profile = 'release'
    targets = ["arm64"]
}

will compile the libs but the libsomething.so does not end up in the rustJniLibs folder, probably because the target folder is not inside libsomething but at the root workspace.

I don't want to compile the entire workspace, just this lib, that's why I point to just it. If I pointed to the workspace, it would probably work, but the workspace contains non android things.

Fully working example: https://github.com/lattice0/flutter_workspace/blob/master/flutter_bug/android/app/build.gradle#L66

What could be done here? I really need this stuff to be in a workspace otherwise rust-analyzer goes completely crazy.

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.