rust-mobile/ndk

Suggestion: feature gate the code

JohnScience opened this issue · 1 comments

I believe it would be useful to provide features for different NDK versions. E.g. "r1", "r2", and so on.

For reference we can use https://developer.android.com/ndk/downloads/revision_history.

This will cut down compile times and most likely will result in fewer errors related to usage of newer versions of NDK than intended.

In order to keep the semver API compatibility, you can add "r24" to the default features.

Can you quantify those compile times and justify the need for additional development effort and maintenance?

Using NDK release numbers has no meaning as Android features are gated behind Android yearly releases, denoted by API levels instead.

Have you used these crates, and noticed that the ndk crate is already guarded by API levels and features when it requires an additional link library?

If such guards are missing in places, PRs are always welcome.