Skip to content

Commit 138902e

Browse files
committed
Bump MSRV to 1.77 for more efficient bindgen output
This includes changing all `std::os::raw::` references to `std::ffi::` in the `ndk-sys` crate, just like the `ndk` crate now that its MSRV is beyond 1.64.
1 parent ec624f2 commit 138902e

13 files changed

+16741
-31541
lines changed

.github/workflows/rust.yml

+4-4
Original file line numberDiff line numberDiff line change
@@ -25,12 +25,12 @@ jobs:
2525
run: cargo clippy --all --all-targets --all-features --target aarch64-linux-android -- -Dwarnings
2626

2727
check_ndk_sys_msrv:
28-
name: Check ndk-sys MSRV (1.60.0)
28+
name: Check ndk-sys MSRV (1.77.0)
2929
runs-on: ubuntu-latest
3030
steps:
3131
- uses: actions/checkout@v4
3232

33-
- uses: dtolnay/rust-toolchain@1.60.0
33+
- uses: dtolnay/rust-toolchain@1.77.0
3434
with:
3535
target: aarch64-linux-android
3636

@@ -41,7 +41,7 @@ jobs:
4141
strategy:
4242
matrix:
4343
minimal-versions: [true, false]
44-
name: Check overall MSRV (1.66.0)
44+
name: Check overall MSRV (1.77.0)
4545
runs-on: ubuntu-latest
4646
steps:
4747
- uses: actions/checkout@v4
@@ -53,7 +53,7 @@ jobs:
5353
run: cargo +nightly generate-lockfile -Zminimal-versions
5454
if: ${{ matrix.minimal-versions }}
5555

56-
- uses: dtolnay/rust-toolchain@1.66.0
56+
- uses: dtolnay/rust-toolchain@1.77.0
5757
with:
5858
target: aarch64-linux-android
5959

README.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@ Rust bindings to the [Android NDK](https://developer.android.com/ndk)
44

55
Name | Description | Badges
66
--- | --- | ---
7-
[`ndk-sys`](./ndk-sys) | Raw FFI bindings to the NDK | [![crates.io](https://img.shields.io/crates/v/ndk-sys.svg)](https://crates.io/crates/ndk-sys) [![Docs](https://docs.rs/ndk-sys/badge.svg)](https://docs.rs/ndk-sys) [![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)
8-
[`ndk`](./ndk) | Safe abstraction of the bindings | [![crates.io](https://img.shields.io/crates/v/ndk.svg)](https://crates.io/crates/ndk) [![Docs](https://docs.rs/ndk/badge.svg)](https://docs.rs/ndk) [![MSRV](https://img.shields.io/badge/rustc-1.64.0+-ab6000.svg)](https://blog.rust-lang.org/2022/09/22/Rust-1.64.0.html)
7+
[`ndk-sys`](./ndk-sys) | Raw FFI bindings to the NDK | [![crates.io](https://img.shields.io/crates/v/ndk-sys.svg)](https://crates.io/crates/ndk-sys) [![Docs](https://docs.rs/ndk-sys/badge.svg)](https://docs.rs/ndk-sys) [![MSRV](https://img.shields.io/badge/rustc-1.77.0+-ab6000.svg)](https://blog.rust-lang.org/2024/03/21/Rust-1.77.0.html)
8+
[`ndk`](./ndk) | Safe abstraction of the bindings | [![crates.io](https://img.shields.io/crates/v/ndk.svg)](https://crates.io/crates/ndk) [![Docs](https://docs.rs/ndk/badge.svg)](https://docs.rs/ndk) [![MSRV](https://img.shields.io/badge/rustc-1.77.0+-ab6000.svg)](https://blog.rust-lang.org/2024/03/21/Rust-1.77.0.html)
99

1010
See these [`ndk-examples`](https://github.com/rust-mobile/cargo-apk/tree/main/examples/examples) and these [`rust-android-examples`](https://github.com/rust-mobile/rust-android-examples) for examples using the NDK.
1111

ndk-sys/CHANGELOG.md

+1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
# Unreleased
22

33
- Regenerate bindings with `bindgen 0.71.1`. (#487)
4+
- **Breaking:** Bump MSRV to 1.77 for more efficient `bindgen` output. (#487)
45

56
# 0.6.0 (2024-04-26)
67

ndk-sys/Cargo.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ readme = "../README.md"
1010
documentation = "https://docs.rs/ndk-sys"
1111
homepage = "https://github.com/rust-mobile/ndk"
1212
repository = "https://github.com/rust-mobile/ndk"
13-
rust-version = "1.60"
13+
rust-version = "1.77"
1414
categories = ["os", "os::android-apis", "external-ffi-bindings"]
1515

1616
[dependencies]

ndk-sys/generate_bindings.sh

+2-1
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,8 @@ sysroot="$PWD/ndk/sysroot/"
2626

2727
while read ARCH && read TARGET ; do
2828
bindgen wrapper.h -o src/ffi_$ARCH.rs \
29-
--rust-target 1.60 \
29+
--rust-target 1.77 \
30+
--ctypes-prefix '::std::ffi' \
3031
--blocklist-item 'JNI\w+' \
3132
--blocklist-item 'C?_?JNIEnv' \
3233
--blocklist-item '_?JavaVM' \

0 commit comments

Comments
 (0)