Skip to content

Commit 35ffc83

Browse files
authored
Merge pull request #324 from madsmtm/fix-msrv
Make our current MSRV match `winit`'s
2 parents 86462b3 + cfdca93 commit 35ffc83

File tree

12 files changed

+54
-3
lines changed

12 files changed

+54
-3
lines changed

.github/workflows/ci.yml

+33
Original file line numberDiff line numberDiff line change
@@ -153,6 +153,39 @@ jobs:
153153
- name: cargo clippy
154154
run: cargo clippy --all-targets ${{ matrix.args }}
155155

156+
msrv:
157+
name: Check MSRV
158+
runs-on: ubuntu-latest
159+
160+
env:
161+
CARGO_BUILD_TARGET: x86_64-apple-darwin
162+
163+
steps:
164+
- uses: actions/checkout@v3
165+
with:
166+
submodules: true
167+
168+
- name: Install Rust toolchain
169+
uses: actions-rs/toolchain@v1
170+
with:
171+
toolchain: '1.60'
172+
profile: minimal
173+
override: true
174+
target: x86_64-apple-darwin
175+
176+
- name: Cache Cargo
177+
uses: actions/cache@v3
178+
with:
179+
path: ${{ env.CARGO_CACHE_PATH }}
180+
key: cargo-${{ github.job }}-${{ matrix.name }}-${{ hashFiles('**/Cargo.lock') }}
181+
182+
- name: cargo check
183+
run: >-
184+
cargo check
185+
$PUBLIC_CRATES
186+
--features=$INTERESTING_FEATURES
187+
--features=unstable-frameworks-macos-12
188+
156189
ui:
157190
name: Compiler UI
158191
runs-on: macos-latest

README.md

+11
Original file line numberDiff line numberDiff line change
@@ -113,6 +113,17 @@ so on, with every following release.
113113
[#32]: https://github.com/madsmtm/objc2/issues/32
114114

115115

116+
## Minimum Supported Rust Version (MSRV)
117+
118+
The _currently_ minimum supported Rust version is `1.60`; this is _not_
119+
defined by policy, though, so it may change in at any time in a patch
120+
release.
121+
122+
Help us define a policy over in [#203].
123+
124+
[#203]: https://github.com/madsmtm/objc2/issues/203
125+
126+
116127
## License
117128

118129
This project is licensed under the MIT license, see [`LICENSE.txt`].

crates/block-sys/Cargo.toml

+1
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ name = "block-sys"
33
version = "0.1.0-beta.2" # Remember to update html_root_url in lib.rs
44
authors = ["Mads Marquart <mads@marquart.dk>"]
55
edition = "2021"
6+
rust-version = "1.60"
67

78
description = "Raw bindings to Apple's C language extension of blocks"
89
keywords = ["objective-c", "macos", "ios", "blocks", "sys"]

crates/block2/Cargo.toml

+1
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ name = "block2"
44
version = "0.2.0-alpha.7"
55
authors = ["Steven Sheldon", "Mads Marquart <mads@marquart.dk>"]
66
edition = "2021"
7+
rust-version = "1.60"
78

89
description = "Apple's C language extension of blocks"
910
keywords = ["objective-c", "macos", "ios", "blocks"]

crates/icrate/Cargo.toml

+1
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ name = "icrate"
33
version = "0.0.1"
44
authors = ["Mads Marquart <mads@marquart.dk>"]
55
edition = "2021"
6+
rust-version = "1.60"
67

78
description = "Bindings to Apple's frameworks"
89
keywords = ["macos", "ios", "cocoa", "apple", "framework"]

crates/icrate/src/Foundation/additions/value.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -192,7 +192,7 @@ impl fmt::Debug for NSValue {
192192
mod tests {
193193
use alloc::format;
194194
use core::{ptr, slice};
195-
use std::ffi::c_char;
195+
use std::os::raw::c_char;
196196

197197
use super::*;
198198
use objc2::rc::{__RcTestObject, __ThreadTestData};

crates/icrate/src/Foundation/fixes/NSDecimal.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
use std::ffi::c_ushort;
1+
use std::os::raw::c_ushort;
22

33
extern_struct!(
44
pub struct NSDecimal {

crates/icrate/src/common.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ pub(crate) use core::ffi::c_void;
55
pub(crate) use core::marker::PhantomData;
66
pub(crate) use core::ptr::NonNull;
77
#[cfg(feature = "std")]
8-
pub(crate) use std::ffi::{
8+
pub(crate) use std::os::raw::{
99
c_char, c_double, c_float, c_int, c_long, c_longlong, c_schar, c_short, c_uchar, c_uint,
1010
c_ulong, c_ulonglong, c_ushort,
1111
};

crates/objc-sys/Cargo.toml

+1
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ name = "objc-sys"
55
version = "0.2.0-beta.3"
66
authors = ["Mads Marquart <mads@marquart.dk>"]
77
edition = "2021"
8+
rust-version = "1.60"
89

910
description = "Raw bindings to the Objective-C runtime and ABI"
1011
keywords = ["objective-c", "macos", "ios", "objc_msgSend", "sys"]

crates/objc2-encode/Cargo.toml

+1
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ name = "objc2-encode"
44
version = "2.0.0-pre.3"
55
authors = ["Steven Sheldon", "Mads Marquart <mads@marquart.dk>"]
66
edition = "2021"
7+
rust-version = "1.60"
78

89
description = "Objective-C type-encodings"
910
keywords = ["objective-c", "macos", "ios", "encode"]

crates/objc2-proc-macros/Cargo.toml

+1
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ name = "objc2-proc-macros"
44
version = "0.1.0"
55
authors = ["Mads Marquart <mads@marquart.dk>", "Calvin Watford"]
66
edition = "2021"
7+
rust-version = "1.60"
78

89
description = "Procedural macros for the objc2 project"
910
keywords = ["objective-c", "macos", "ios", "proc-macro"]

crates/objc2/Cargo.toml

+1
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ name = "objc2"
33
version = "0.3.0-beta.4" # Remember to update html_root_url in lib.rs
44
authors = ["Steven Sheldon", "Mads Marquart <mads@marquart.dk>"]
55
edition = "2021"
6+
rust-version = "1.60"
67

78
description = "Objective-C interface and bindings to the Cocoa Foundation framework"
89
keywords = ["objective-c", "macos", "ios", "objc_msgSend", "cocoa"]

0 commit comments

Comments
 (0)