Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions .cargo/config.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# Align Android native libraries to a 16 KB max page size. Android 15 requires
# 16 KB-aligned ELF LOAD segments on 16 KB-page devices; the NDK linker still
# defaults to 4 KB (0x1000) up to NDK r27. Applies only to the Android targets,
# which are built solely for the `mobile` crate. See issue #79.
[target.aarch64-linux-android]
rustflags = ["-C", "link-arg=-Wl,-z,max-page-size=16384"]

[target.x86_64-linux-android]
rustflags = ["-C", "link-arg=-Wl,-z,max-page-size=16384"]
3 changes: 2 additions & 1 deletion android/app/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,8 @@ dependencies {
val composeBom = platform("androidx.compose:compose-bom:2024.09.03")

// UniFFI-generated Kotlin needs JNA (with the @aar classifier on Android).
implementation("net.java.dev.jna:jna:5.14.0@aar")
// 5.15+ ships 16 KB-aligned native libs (Android 15 requirement, #79).
implementation("net.java.dev.jna:jna:5.15.0@aar")

// JVM unit tests for the pure Kotlin editor transforms (no device, no native
// lib: the UniFFI bindings load libplain_note_mobile.so lazily on the first
Expand Down
Loading