rust-mobile / android-activity

Glue for building Rust applications on Android with NativeActivity or GameActivity
238 stars 46 forks source link

Fix `unexpected-cfgs` lint detected since Rust 1.80 #164

Open MarijnS95 opened 1 month ago

MarijnS95 commented 1 month ago

Rust 1.80 from July 25th 2024 points out that armv7 is not a known, valid value for the target_arch cfg variable. This is confirmed by the docs not listing it either: https://doc.rust-lang.org/reference/conditional-compilation.html#target_arch.

Hence drop this entirely, and rely purely on target_arch = "arm".

Furthermore it also points out that we don't have a test and api-level-30 feature: remove the unused test feature and reexpose ConfigurationRef::screen_round() which was behind a previously unsettable feature = "api-level-30".

MarijnS95 commented 1 week ago

@rib how do we want to deal with this for our MSRV:

error: package `num_enum v0.7.3` cannot be built because it requires rustc 1.70.0 or newer, while the currently active rustc version is 1.69.0
Either upgrade to rustc 1.70.0 or newer, or use
cargo update -p num_enum@0.7.3 --precise ver
where `ver` is the latest version of `num_enum` supporting rustc 1.69.0

Shall we run a cargo +nightly generate-lockfile -Zminimal-versions before running the MSRV check?