Skip to content

Commit 107f03e

Browse files
authored
Lock MSRV to 1.60 and validate in CI (#362)
* Lock MSRV to 1.60 and validate in CI Prevent inadvertently bumping MSRV in PRs by checking against MSRV in the CI, to disallow any large bumps without rationale. Rust 1.60 is 7 months old at the time of writing, and also required by `winit` which uses `android-ndk-rs`, hence must be compatible with it. This does not mean that we cannot bump MSRV at all, but we must remain a tad conservative; at the same time setting [`rust-version`] in the manifest provides everyone on Rust 1.56 and higher a helpful error message when their version is lower than what we require. [`rust-version`]: https://doc.rust-lang.org/cargo/reference/manifest.html#the-rust-version-field * ndk-build: Bump quick-xml to 0.26 to solve accidental MSRV bump Git history suggests that `quick-xml` backed out of an (un?)intentional MSRV bump and is now back at Rust 1.46; well below our MSRV needed for `winit`.
1 parent d7e307e commit 107f03e

File tree

9 files changed

+24
-2
lines changed

9 files changed

+24
-2
lines changed

.github/workflows/rust.yml

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,20 @@ jobs:
3636
# also compile cleanly under this target.
3737
args: --all --all-targets --all-features --target aarch64-linux-android -- -Dwarnings
3838

39+
check_msrv:
40+
name: Check MSRV (1.60.0)
41+
runs-on: ubuntu-latest
42+
steps:
43+
- uses: actions/checkout@v1
44+
- uses: dtolnay/[email protected]
45+
with:
46+
target: aarch64-linux-android
47+
- uses: actions-rs/cargo@v1
48+
with:
49+
command: check
50+
# See comment above about using one of our supported targets.
51+
args: --workspace --all-targets --all-features --target aarch64-linux-android
52+
3953
build:
4054
strategy:
4155
fail-fast: false

README.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
# Rust on Android
22

3-
[![Rust](https://github.com/rust-windowing/android-ndk-rs/workflows/Rust/badge.svg)](https://github.com/rust-windowing/android-ndk-rs/actions) ![MIT license](https://img.shields.io/badge/License-MIT-green.svg) ![APACHE2 license](https://img.shields.io/badge/License-APACHE2-green.svg)
3+
[![Rust](https://github.com/rust-windowing/android-ndk-rs/workflows/Rust/badge.svg)](https://github.com/rust-windowing/android-ndk-rs/actions) ![MIT license](https://img.shields.io/badge/License-MIT-green.svg) ![APACHE2 license](https://img.shields.io/badge/License-APACHE2-green.svg) [![MSRV](https://img.shields.io/badge/rustc-1.60.0+-ab6000.svg)](https://blog.rust-lang.org/2022/04/07/Rust-1.60.0.html)
4+
45

56
Libraries and tools for Rust programming on Android targets:
67

cargo-apk/Cargo.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ keywords = ["android", "ndk", "apk"]
99
documentation = "https://docs.rs/cargo-apk"
1010
homepage = "https://github.com/rust-windowing/android-ndk-rs"
1111
repository = "https://github.com/rust-windowing/android-ndk-rs"
12+
rust-version = "1.60"
1213

1314
[dependencies]
1415
anyhow = "1.0.57"

ndk-build/Cargo.toml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,12 @@ keywords = ["android", "ndk", "apk"]
99
documentation = "https://docs.rs/ndk-build"
1010
homepage = "https://github.com/rust-windowing/android-ndk-rs"
1111
repository = "https://github.com/rust-windowing/android-ndk-rs"
12+
rust-version = "1.60"
1213

1314
[dependencies]
1415
dirs = "4"
1516
dunce = "1"
16-
quick-xml = { version = "0.25", features = ["serialize"] }
17+
quick-xml = { version = "0.26", features = ["serialize"] }
1718
serde = { version = "1", features = ["derive"] }
1819
thiserror = "1"
1920
which = "4"

ndk-context/Cargo.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,3 +9,4 @@ keywords = ["android", "ndk", "apk", "jni"]
99
documentation = "https://docs.rs/ndk-context"
1010
homepage = "https://github.com/rust-windowing/android-ndk-rs"
1111
repository = "https://github.com/rust-windowing/android-ndk-rs"
12+
rust-version = "1.60"

ndk-glue/Cargo.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ readme = "README.md"
1010
documentation = "https://docs.rs/ndk-glue"
1111
homepage = "https://github.com/rust-windowing/android-ndk-rs"
1212
repository = "https://github.com/rust-windowing/android-ndk-rs"
13+
rust-version = "1.60"
1314

1415
[dependencies]
1516
android_logger = { version = "0.11", optional = true }

ndk-macro/Cargo.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ readme = "README.md"
1010
documentation = "https://docs.rs/ndk-macro"
1111
homepage = "https://github.com/rust-windowing/android-ndk-rs"
1212
repository = "https://github.com/rust-windowing/android-ndk-rs"
13+
rust-version = "1.60"
1314

1415
[lib]
1516
proc-macro = true

ndk-sys/Cargo.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ readme = "../README.md"
1010
documentation = "https://docs.rs/android-ndk-sys"
1111
homepage = "https://github.com/rust-windowing/android-ndk-rs"
1212
repository = "https://github.com/rust-windowing/android-ndk-rs"
13+
rust-version = "1.60"
1314

1415
[dependencies]
1516
jni-sys = "0.3.0"

ndk/Cargo.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ readme = "../README.md"
1010
documentation = "https://docs.rs/android-ndk"
1111
homepage = "https://github.com/rust-windowing/android-ndk-rs"
1212
repository = "https://github.com/rust-windowing/android-ndk-rs"
13+
rust-version = "1.60"
1314

1415
[features]
1516
all = ["audio", "bitmap","media", "api-level-30"]

0 commit comments

Comments
 (0)