Skip to content

Support 16 KB page sizes #151

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Support 16 KB page sizes #151

wants to merge 1 commit into from

Conversation

Mygod
Copy link
Contributor

@Mygod Mygod commented Aug 28, 2024

No description provided.

@MattiasBuelens
Copy link

Starting in November 2025, support for 16KB page sizes will become mandatory, so Android app developers using Rust libraries will urgently need this.

For now, you can work around this (without this PR) by adding an exec to your cargo Gradle configuration:

cargo {
    // ...
    libname = "myrustlibrary"

    exec { spec, toolchain ->
        // Support 16KB page sizes
        // https://developer.android.com/guide/practices/page-sizes#other-build-systems
        spec.environment("RUST_ANDROID_GRADLE_CC_LINK_ARG", "-Wl,-z,max-page-size=16384,-soname,lib${libname}.so")
    }
}

(Make sure to run cargo clean first, so you'll actually rebuild the Rust libraries. 😉)

However, it would be much better if the Rust Android Gradle plugin handled this out of the box. Could a maintainer please take a look at this PR? 🙏

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants