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

Update objc2 to v0.6, and use new objc2-core-graphics crate #254

Merged
merged 2 commits into from
Feb 5, 2025
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
8 changes: 3 additions & 5 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ jobs:
strategy:
fail-fast: false
matrix:
rust_version: ['1.70.0', stable, nightly]
rust_version: ['1.71.0', stable, nightly]
platform:
- { target: x86_64-pc-windows-msvc, os: windows-latest, }
- { target: i686-pc-windows-msvc, os: windows-latest, }
Expand All @@ -51,7 +51,7 @@ jobs:
- { target: wasm32-unknown-unknown, os: ubuntu-latest, }
exclude:
# Orbital doesn't follow MSRV
- rust_version: '1.70.0'
- rust_version: '1.71.0'
platform: { target: x86_64-unknown-redox, os: ubuntu-latest }
include:
- rust_version: nightly
Expand Down Expand Up @@ -96,11 +96,9 @@ jobs:
run: sudo apt-get install gcc-multilib

- name: Pin deps that break MSRV
if: matrix.rust_version == '1.70.0'
if: matrix.rust_version == '1.71.0'
run: |
cargo update -p ahash --precise 0.8.7
cargo update -p bumpalo --precise 3.14.0
cargo update -p objc2-encode --precise 4.0.3

- name: Build crate
shell: bash
Expand Down
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
# Unreleased

- Update to `objc2` 0.6.0.
- Bump MSRV to Rust 1.71.

# 0.4.6

- Added support for iOS, tvOS, watchOS and visionOS (UIKit).
Expand Down
82 changes: 64 additions & 18 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ repository = "https://github.com/rust-windowing/softbuffer"
keywords = ["framebuffer", "windowing"]
categories = ["game-development", "graphics", "gui", "multimedia", "rendering"]
exclude = ["examples"]
rust-version = "1.70.0"
rust-version = "1.71.0"

[[bench]]
name = "buffer_mut"
Expand All @@ -19,13 +19,29 @@ harness = false
[features]
default = ["kms", "x11", "x11-dlopen", "wayland", "wayland-dlopen"]
kms = ["bytemuck", "drm", "rustix"]
wayland = ["wayland-backend", "wayland-client", "wayland-sys", "memmap2", "rustix", "fastrand"]
wayland = [
"wayland-backend",
"wayland-client",
"wayland-sys",
"memmap2",
"rustix",
"fastrand",
]
wayland-dlopen = ["wayland-sys/dlopen"]
x11 = ["as-raw-xcb-connection", "bytemuck", "fastrand", "rustix", "tiny-xlib", "x11rb"]
x11 = [
"as-raw-xcb-connection",
"bytemuck",
"fastrand",
"rustix",
"tiny-xlib",
"x11rb",
]
x11-dlopen = ["tiny-xlib/dlopen", "x11rb/dl-libxcb"]

[dependencies]
raw_window_handle = { package = "raw-window-handle", version = "0.6", features = ["std"] }
raw_window_handle = { package = "raw-window-handle", version = "0.6", features = [
"std",
] }
tracing = { version = "0.1.41", default-features = false }

[target.'cfg(target_os = "android")'.dependencies]
Expand All @@ -38,31 +54,61 @@ bytemuck = { version = "1.12.3", optional = true }
drm = { version = "0.14.1", default-features = false, optional = true }
fastrand = { version = "2.0.0", optional = true }
memmap2 = { version = "0.9.0", optional = true }
rustix = { version = "0.38.19", features = ["fs", "mm", "shm", "std"], default-features = false, optional = true }
rustix = { version = "0.38.19", features = [
"fs",
"mm",
"shm",
"std",
], default-features = false, optional = true }
tiny-xlib = { version = "0.2.1", optional = true }
wayland-backend = { version = "0.3.0", features = ["client_system"], optional = true }
wayland-backend = { version = "0.3.0", features = [
"client_system",
], optional = true }
wayland-client = { version = "0.31.0", optional = true }
wayland-sys = { version = "0.31.0", optional = true }
x11rb = { version = "0.13.0", features = ["allow-unsafe-code", "shm"], optional = true }
x11rb = { version = "0.13.0", features = [
"allow-unsafe-code",
"shm",
], optional = true }

[target.'cfg(target_os = "windows")'.dependencies.windows-sys]
version = "0.59.0"
features = ["Win32_Graphics_Gdi", "Win32_UI_Shell", "Win32_UI_WindowsAndMessaging", "Win32_Foundation"]
features = [
"Win32_Graphics_Gdi",
"Win32_UI_Shell",
"Win32_UI_WindowsAndMessaging",
"Win32_Foundation",
]

[target.'cfg(target_vendor = "apple")'.dependencies]
bytemuck = { version = "1.12.3", features = ["extern_crate_alloc"] }
core-graphics = "0.24.0"
foreign-types = "0.5.0"
objc2 = "0.5.2"
objc2-foundation = { version = "0.2.2", features = [
objc2-core-graphics = { version = "0.3.0", default-features = false, features = [
"std",
"objc2",
"CGColorSpace",
"CGDataProvider",
"CGImage",
] }
objc2 = "0.6.0"
objc2-core-foundation = { version = "0.3.0", default-features = false, features = [
"std",
"CFCGTypes",
] }
objc2-foundation = { version = "0.3.0", default-features = false, features = [
"std",
"objc2-core-foundation",
"NSDictionary",
"NSGeometry",
"NSKeyValueObserving",
"NSString",
"NSThread",
"NSValue",
] }
objc2-quartz-core = { version = "0.2.2", features = ["CALayer", "CATransaction"] }
objc2-quartz-core = { version = "0.3.0", default-features = false, features = [
"std",
"objc2-core-foundation",
"CALayer",
"CATransaction",
] }

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

[dev-dependencies]
colorous = "1.0.12"
criterion = { version = "0.4.0", default-features = false, features = ["cargo_bench_support"] }
criterion = { version = "0.4.0", default-features = false, features = [
"cargo_bench_support",
] }
web-time = "1.0.0"
winit = "0.30.0"

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

[workspace]
members = [
"run-wasm",
]
members = ["run-wasm"]

[[example]]
# Run with `cargo apk r --example winit_android`
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ fn main() {

## MSRV Policy

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

As a **tentative** policy, the upper bound of the MSRV is given by the following
Expand Down
Loading