From db3ea3386fc701a05c226353e61b8e06dc32a4a1 Mon Sep 17 00:00:00 2001 From: Robert Bragg Date: Mon, 31 Mar 2025 23:23:08 +0100 Subject: [PATCH] Bump rust-version to 1.73.0 There was a fix for the definition of the `stat` struct on Android in 1.73, and even though it's unlikely to affect many applications it still seems worthwhile to draw a line under this and ensure that all android-activity based applications will have that fix. Rust 1.73 was released October 2023, which is still well over a year old and very conservative. This updates `generate-bindings.sh` to pass `--rust-target 1.73.0` so we avoid generating bindings that require a more recent compiler. (This doesn't actually regenerate the bindings but does ensure that future updates will be constrained to generate code that is backwards compatible with 1.73.) --- .github/workflows/ci.yml | 2 +- android-activity/CHANGELOG.md | 2 ++ android-activity/Cargo.toml | 10 ++++------ android-activity/generate-bindings.sh | 1 + 4 files changed, 8 insertions(+), 7 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index dc7f708..3154a3a 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -17,7 +17,7 @@ jobs: fail-fast: false matrix: # See top README for MSRV policy - rust-version: [1.69.0, stable] + rust-version: [1.73.0, stable] steps: - uses: actions/checkout@v4 diff --git a/android-activity/CHANGELOG.md b/android-activity/CHANGELOG.md index 1b1b961..d33a48b 100644 --- a/android-activity/CHANGELOG.md +++ b/android-activity/CHANGELOG.md @@ -16,6 +16,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 > - `Source::is_xxx_class()` functions are replaced by querying `Source::class()` and comparing against variants from the returned `SourceClass` `bitflags` enum. > - `SourceFlags::TRACKBALL` (from `Source::is_trackball_class()`) is named `SourceClass::NAVIGATION` in the `ndk`. +- rust-version bumped to 1.73.0 ([#193](https://github.com/rust-mobile/android-activity/pull/193)) + ## [0.6.0] - 2024-04-26 ### Changed diff --git a/android-activity/Cargo.toml b/android-activity/Cargo.toml index 4ea8435..2695132 100644 --- a/android-activity/Cargo.toml +++ b/android-activity/Cargo.toml @@ -10,12 +10,10 @@ documentation = "https://docs.rs/android-activity" description = "Glue for building Rust applications on Android with NativeActivity or GameActivity" license = "MIT OR Apache-2.0" -# 1.69 was when Rust last updated the Android NDK version used to build the -# standard library which avoids needing the -lunwind workaround in build tools. -# -# We depend on cargo-ndk for building which has dropped support for the above -# linker workaround. -rust-version = "1.69.0" +# Even though we could technically still build with 1.69, 1.73 has a fix for the +# definition of the `stat` struct on Android, and so it seems worthwhile drawing +# a line under that to ensure android-activity applications have that fix. +rust-version = "1.73.0" [features] # Note: we don't enable any backend by default since features diff --git a/android-activity/generate-bindings.sh b/android-activity/generate-bindings.sh index 51c5602..690bfbd 100644 --- a/android-activity/generate-bindings.sh +++ b/android-activity/generate-bindings.sh @@ -14,6 +14,7 @@ while read ARCH && read TARGET ; do # --module-raw-line 'use ' bindgen game-activity-ffi.h -o src/game_activity/ffi_$ARCH.rs \ + --rust-target '1.73.0' \ --blocklist-item 'JNI\w+' \ --blocklist-item 'C?_?JNIEnv' \ --blocklist-item '_?JavaVM' \