Skip to content

Commit 2090136

Browse files
committed
Update objc2 to v0.6, and use new objc2-core-graphics crate
1 parent 11bfe5f commit 2090136

File tree

5 files changed

+147
-91
lines changed

5 files changed

+147
-91
lines changed

.github/workflows/ci.yml

+3-5
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ jobs:
3131
strategy:
3232
fail-fast: false
3333
matrix:
34-
rust_version: ['1.70.0', stable, nightly]
34+
rust_version: ['1.71.0', stable, nightly]
3535
platform:
3636
- { target: x86_64-pc-windows-msvc, os: windows-latest, }
3737
- { target: i686-pc-windows-msvc, os: windows-latest, }
@@ -51,7 +51,7 @@ jobs:
5151
- { target: wasm32-unknown-unknown, os: ubuntu-latest, }
5252
exclude:
5353
# Orbital doesn't follow MSRV
54-
- rust_version: '1.70.0'
54+
- rust_version: '1.71.0'
5555
platform: { target: x86_64-unknown-redox, os: ubuntu-latest }
5656
include:
5757
- rust_version: nightly
@@ -96,11 +96,9 @@ jobs:
9696
run: sudo apt-get install gcc-multilib
9797

9898
- name: Pin deps that break MSRV
99-
if: matrix.rust_version == '1.70.0'
99+
if: matrix.rust_version == '1.71.0'
100100
run: |
101-
cargo update -p ahash --precise 0.8.7
102101
cargo update -p bumpalo --precise 3.14.0
103-
cargo update -p objc2-encode --precise 4.0.3
104102
105103
- name: Build crate
106104
shell: bash

CHANGELOG.md

+3
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
# Unreleased
22

3+
- Update to `objc2` 0.6.0.
4+
- Bump MSRV to Rust 1.71.
5+
36
# 0.4.6
47

58
- Added support for iOS, tvOS, watchOS and visionOS (UIKit).

Cargo.toml

+64-18
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ repository = "https://github.com/rust-windowing/softbuffer"
1010
keywords = ["framebuffer", "windowing"]
1111
categories = ["game-development", "graphics", "gui", "multimedia", "rendering"]
1212
exclude = ["examples"]
13-
rust-version = "1.70.0"
13+
rust-version = "1.71.0"
1414

1515
[[bench]]
1616
name = "buffer_mut"
@@ -19,13 +19,29 @@ harness = false
1919
[features]
2020
default = ["kms", "x11", "x11-dlopen", "wayland", "wayland-dlopen"]
2121
kms = ["bytemuck", "drm", "rustix"]
22-
wayland = ["wayland-backend", "wayland-client", "wayland-sys", "memmap2", "rustix", "fastrand"]
22+
wayland = [
23+
"wayland-backend",
24+
"wayland-client",
25+
"wayland-sys",
26+
"memmap2",
27+
"rustix",
28+
"fastrand",
29+
]
2330
wayland-dlopen = ["wayland-sys/dlopen"]
24-
x11 = ["as-raw-xcb-connection", "bytemuck", "fastrand", "rustix", "tiny-xlib", "x11rb"]
31+
x11 = [
32+
"as-raw-xcb-connection",
33+
"bytemuck",
34+
"fastrand",
35+
"rustix",
36+
"tiny-xlib",
37+
"x11rb",
38+
]
2539
x11-dlopen = ["tiny-xlib/dlopen", "x11rb/dl-libxcb"]
2640

2741
[dependencies]
28-
raw_window_handle = { package = "raw-window-handle", version = "0.6", features = ["std"] }
42+
raw_window_handle = { package = "raw-window-handle", version = "0.6", features = [
43+
"std",
44+
] }
2945
tracing = { version = "0.1.41", default-features = false }
3046

3147
[target.'cfg(target_os = "android")'.dependencies]
@@ -38,31 +54,61 @@ bytemuck = { version = "1.12.3", optional = true }
3854
drm = { version = "0.14.1", default-features = false, optional = true }
3955
fastrand = { version = "2.0.0", optional = true }
4056
memmap2 = { version = "0.9.0", optional = true }
41-
rustix = { version = "0.38.19", features = ["fs", "mm", "shm", "std"], default-features = false, optional = true }
57+
rustix = { version = "0.38.19", features = [
58+
"fs",
59+
"mm",
60+
"shm",
61+
"std",
62+
], default-features = false, optional = true }
4263
tiny-xlib = { version = "0.2.1", optional = true }
43-
wayland-backend = { version = "0.3.0", features = ["client_system"], optional = true }
64+
wayland-backend = { version = "0.3.0", features = [
65+
"client_system",
66+
], optional = true }
4467
wayland-client = { version = "0.31.0", optional = true }
4568
wayland-sys = { version = "0.31.0", optional = true }
46-
x11rb = { version = "0.13.0", features = ["allow-unsafe-code", "shm"], optional = true }
69+
x11rb = { version = "0.13.0", features = [
70+
"allow-unsafe-code",
71+
"shm",
72+
], optional = true }
4773

4874
[target.'cfg(target_os = "windows")'.dependencies.windows-sys]
4975
version = "0.59.0"
50-
features = ["Win32_Graphics_Gdi", "Win32_UI_Shell", "Win32_UI_WindowsAndMessaging", "Win32_Foundation"]
76+
features = [
77+
"Win32_Graphics_Gdi",
78+
"Win32_UI_Shell",
79+
"Win32_UI_WindowsAndMessaging",
80+
"Win32_Foundation",
81+
]
5182

5283
[target.'cfg(target_vendor = "apple")'.dependencies]
53-
bytemuck = { version = "1.12.3", features = ["extern_crate_alloc"] }
54-
core-graphics = "0.24.0"
55-
foreign-types = "0.5.0"
56-
objc2 = "0.5.2"
57-
objc2-foundation = { version = "0.2.2", features = [
84+
objc2-core-graphics = { version = "0.3.0", default-features = false, features = [
85+
"std",
86+
"objc2",
87+
"CGColorSpace",
88+
"CGDataProvider",
89+
"CGImage",
90+
] }
91+
objc2 = "0.6.0"
92+
objc2-core-foundation = { version = "0.3.0", default-features = false, features = [
93+
"std",
94+
"CFCGTypes",
95+
] }
96+
objc2-foundation = { version = "0.3.0", default-features = false, features = [
97+
"std",
98+
"objc2-core-foundation",
5899
"NSDictionary",
59100
"NSGeometry",
60101
"NSKeyValueObserving",
61102
"NSString",
62103
"NSThread",
63104
"NSValue",
64105
] }
65-
objc2-quartz-core = { version = "0.2.2", features = ["CALayer", "CATransaction"] }
106+
objc2-quartz-core = { version = "0.3.0", default-features = false, features = [
107+
"std",
108+
"objc2-core-foundation",
109+
"CALayer",
110+
"CATransaction",
111+
] }
66112

67113
[target.'cfg(target_arch = "wasm32")'.dependencies]
68114
js-sys = "0.3.63"
@@ -89,7 +135,9 @@ cfg_aliases = "0.2.0"
89135

90136
[dev-dependencies]
91137
colorous = "1.0.12"
92-
criterion = { version = "0.4.0", default-features = false, features = ["cargo_bench_support"] }
138+
criterion = { version = "0.4.0", default-features = false, features = [
139+
"cargo_bench_support",
140+
] }
93141
web-time = "1.0.0"
94142
winit = "0.30.0"
95143

@@ -114,9 +162,7 @@ wasm-bindgen-test = "0.3"
114162
rustix = { version = "0.38.8", features = ["event"] }
115163

116164
[workspace]
117-
members = [
118-
"run-wasm",
119-
]
165+
members = ["run-wasm"]
120166

121167
[[example]]
122168
# Run with `cargo apk r --example winit_android`

README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -141,7 +141,7 @@ fn main() {
141141

142142
## MSRV Policy
143143

144-
This crate's Minimum Supported Rust Version (MSRV) is **1.70**. Changes to
144+
This crate's Minimum Supported Rust Version (MSRV) is **1.71**. Changes to
145145
the MSRV will be accompanied by a minor version bump.
146146

147147
As a **tentative** policy, the upper bound of the MSRV is given by the following

0 commit comments

Comments
 (0)