Skip to content

fix: android arm32 uniffi return carriers #149

Description

@ovitrif

Context

Android production crash synonymdev/bitkit-android#983 recurred on armeabi-v7a devices. The failure occurs during UniFFI API checksum validation and matches mozilla/uniffi-rs#2740.

The Android binding generated through Gobley used signed Kotlin Byte and Short FFI carriers for direct Rust u8 and u16 returns. ARM32 ART can interpret those returns incompatibly, causing checksum values above Short.MAX_VALUE to fail binding initialization.

Scope

  • Pin build_android.sh to the reviewed Gobley revision containing the widened direct-return carrier fix.
  • Regenerate the 0.5.14 mobile bindings and release artifacts with Int FFI carriers for direct u8 and u16 returns while preserving the Kotlin-facing APIs.
  • Remove generated Android JNI libraries from source control and ignore bindings/android/lib/src/main/jniLibs/.
    • The release workflow rebuilds the JNI libraries before publishing the Android AAR.
  • Document CI ownership of Android binding publication while keeping the local platform binding commands available.
  • Validate the regression with a controlled ARM32 release A/B using an older affected AAR and the fixed 0.5.14 AAR.

Acceptance criteria

  • Android binding generation uses the pinned Gobley revision 9bf3be0cfc39c1cc7a3853cc9f0a0dee79eb0f75.
  • Generated checksum externs and every direct u8 and u16 FFI return use Int carriers.
  • Kotlin-facing UByte and UShort APIs remain unchanged.
  • Version metadata and regenerated 0.5.14 mobile artifacts remain synchronized.
  • The Android AAR contains every supported ABI and passes the repository release checks.
  • Generated Android JNI libraries are untracked and ignored; CI rebuilds them before publishing the AAR.
  • ARM32 release validation reproduces the exact UniFFI checksum crash with bitkit-core 0.5.11 and completes three cold launches with 0.5.14 (validation details).

Parent epic: synonymdev/bitkit-android#986

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions