Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Revert 'Bump MSRV to 1.68' #104

Merged
merged 1 commit into from
Aug 7, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 7 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,9 @@ jobs:
strategy:
fail-fast: false
matrix:
# See top README for MSRV policy
rust_version: [1.68.0, stable]
# XXX: We are currently constrained by Winit's MSRV policy + CI system
# See Cargo.toml for details
rust_version: [1.64.0, stable]
steps:
- uses: actions/checkout@v3

Expand All @@ -34,7 +35,10 @@ jobs:
i686-linux-android

- name: Install cargo-ndk
run: cargo install cargo-ndk
# XXX: We have to use an old version of cargo-ndk that supports the
# libgcc linker workaround for rust < 1.68 because Winit's CI system
# currently requires this crate to be buildable with 1.64
run: cargo install cargo-ndk --version "^2"

- name: Setup Java
uses: actions/setup-java@v3
Expand Down
14 changes: 13 additions & 1 deletion android-activity/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,19 @@ repository = "https://github.com/rust-mobile/android-activity"
documentation = "https://docs.rs/android-activity"
description = "Glue for building Rust applications on Android with NativeActivity or GameActivity"
license = "MIT OR Apache-2.0"
rust-version = "1.68.0"

# XXX: Even though we have our own MSRV policy that says we only promise to
# support stable releases over the last three months we actually end up
# constrained by the MSRV policy of Winit, which is currently based on
# supporting Alacritty on Debian Sid, and requires a > 10 month old Rust version
#
# This Winit policiy is unfortunately in conflict with what makes sense for
# Android because versions below 1.68 for Android requires awkward toolchain
# linker workarounds, and can't even be compiled with newer versions of
# `cargo ndk` that removed these linker workarounds.
#
# TODO: Open a PR for Winit's CI to test Android builds using a newer toolchain.
rust-version = "1.64"

[features]
# Note: we don't enable any backend by default since features
Expand Down
1 change: 1 addition & 0 deletions android-activity/src/game_activity/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -759,6 +759,7 @@ extern "Rust" {
// `app_main` function. This is run on a dedicated thread spawned
// by android_native_app_glue.
#[no_mangle]
#[allow(unused_unsafe)] // Otherwise rust 1.64 moans about using unsafe{} in unsafe functions
pub unsafe extern "C" fn _rust_glue_entry(native_app: *mut ffi::android_app) {
abort_on_panic(|| {
// Maybe make this stdout/stderr redirection an optional / opt-in feature?...
Expand Down
1 change: 1 addition & 0 deletions android-activity/src/native_activity/glue.rs
Original file line number Diff line number Diff line change
Expand Up @@ -828,6 +828,7 @@ unsafe extern "C" fn on_content_rect_changed(

/// This is the native entrypoint for our cdylib library that `ANativeActivity` will look for via `dlsym`
#[no_mangle]
#[allow(unused_unsafe)] // Otherwise rust 1.64 moans about using unsafe{} in unsafe functions
extern "C" fn ANativeActivity_onCreate(
activity: *mut ndk_sys::ANativeActivity,
saved_state: *const libc::c_void,
Expand Down
Loading