Skip to content

Build: cargo-ndk 4.x and NDK r30 - #6

Merged
Lyten02 merged 1 commit into
mainfrom
build/cargo-ndk-4
Oct 30, 2026
Merged

Lyten02 merged 1 commit into
mainfrom
build/cargo-ndk-4

Conversation

@Lyten02

@Lyten02 Lyten02 commented Oct 30, 2026

Copy link
Copy Markdown
Owner
  • cargo-ndk 4 no longer reads [package.metadata.ndk], so the platform fell back to API 21 and linking failed with -laaudio (e.g. the Android APK job on main after CI: self-hosted runner #5). Pass --platform 26 explicitly in the Gradle buildRustLib task and in the CI Android clippy step; drop the dead metadata.
  • cargo ndk -o in 4.x copies every cdylib artifact, including iroh/iroh-relay own cdylibs, into jniLibs. buildRustLib now builds without -o and copies only libaudiobridge.so (and drops stale files from jniLibs/arm64-v8a).
  • NDK r23 → r30 (30.0.16248370); the self-hosted runner already uses it. Docs (AGENTS.md, READMEs, CI comment) updated.

Verified on the server: ./gradlew :app:assembleDebug with cargo-ndk 4.1.2 + NDK r30; libaudiobridge.so NEEDED = liblog, libaaudio, libdl, libm, libc; all undefined symbols resolve against the API 26 stubs except weak getrandom.

cargo-ndk 4 no longer reads [package.metadata.ndk], so the platform fell back to
API 21 and linking failed on -laaudio. Pass --platform 26 explicitly (Gradle
buildRustLib, CI clippy) and drop the dead metadata. Gradle now copies only
libaudiobridge.so into jniLibs: cargo-ndk 4 -o also copies iroh's own cdylibs.
Toolchain moves from NDK r23 to r30 (30.0.16248370).
Copilot AI balanced review requested due to automatic review settings October 30, 2026 16:38

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota.

@Lyten02
Lyten02 merged commit e43172f into main Oct 30, 2026
4 checks passed
@Lyten02
Lyten02 deleted the build/cargo-ndk-4 branch October 30, 2026 17:02
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