Bump objc-rs to 0.3 so Apple's runtime is used off macOS/iOS#653
Open
benface wants to merge 1 commit into
Open
Bump objc-rs to 0.3 so Apple's runtime is used off macOS/iOS#653benface wants to merge 1 commit into
benface wants to merge 1 commit into
Conversation
`objc-rs 0.2.8` picks its Objective-C runtime with `any(target_os = "macos", target_os = "ios")`, so tvOS, watchOS and visionOS fall through to the GNUstep backend and fail to link against Apple SDKs with `Undefined symbol: _objc_msg_lookup`. `objc-rs` widened that to `target_vendor = "apple"` in raphamorim/objc-rs#3, released in 0.3.2. There is no 0.2.x carrying the fix, so the pin has to move to 0.3. No source changes were needed — miniquad's usage sits entirely within the API 0.2 and 0.3 share. Verified with `cargo build` on every Apple target: - `aarch64-apple-darwin` - `aarch64-apple-ios` - `aarch64-apple-ios-sim` - `aarch64-apple-tvos` - `aarch64-apple-tvos-sim` Checked the tvOS rlib for the symptom directly: no `_objc_msg_lookup` references remain. A downstream macroquad game also links and runs on the tvOS Simulator against plain upstream miniquad with no `[patch.crates-io]` entry for `objc-rs`, which was not possible before. Closes not-fl3#652.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #652.
Why
objc-rs 0.2.8selects its Objective-C runtime with:#[cfg(any(target_os = "macos", target_os = "ios"))]so tvOS, watchOS and visionOS fall through to the GNUstep backend and fail to link against Apple SDKs:
That's a GNUstep symbol; Apple's runtime provides
_objc_msgSend.objc-rswidened the predicate totarget_vendor = "apple"in raphamorim/objc-rs#3, released in 0.3.2. The maintainer opted to ship it on the 0.3.x line rather than backport to 0.2.x (raphamorim/objc-rs#4), so moving the pin is the only way to pick it up.This mattered immediately because #651 (tvOS build support, merged) makes miniquad compile for tvOS while a downstream app still couldn't link.
Scope
One line in
Cargo.toml. No source changes — miniquad'sobjcusage sits entirely within the API 0.2 and 0.3 share, so nothing needed adapting.Verification
cargo buildclean on every Apple target:aarch64-apple-darwinaarch64-apple-iosaarch64-apple-ios-simaarch64-apple-tvosaarch64-apple-tvos-simI also checked the symptom directly rather than trusting the build: the tvOS rlib contains zero
_objc_msg_lookupreferences after the bump.End-to-end, a macroquad game (CHOMP) now builds, links and runs on the tvOS Simulator against plain upstream miniquad with no
[patch.crates-io]entry forobjc-rs— which wasn't possible before this.Happy to hold if you'd rather wait for a 0.2.x backport, but the maintainer has indicated 0.3.x is where the fix lives.