Skip to content

Bump objc-rs to 0.3 so Apple's runtime is used off macOS/iOS#653

Open
benface wants to merge 1 commit into
not-fl3:masterfrom
benface:objc-rs-0.3
Open

Bump objc-rs to 0.3 so Apple's runtime is used off macOS/iOS#653
benface wants to merge 1 commit into
not-fl3:masterfrom
benface:objc-rs-0.3

Conversation

@benface

@benface benface commented Jul 25, 2026

Copy link
Copy Markdown
Contributor

Closes #652.

Why

objc-rs 0.2.8 selects 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:

Undefined symbol: _objc_msg_lookup

That's a GNUstep symbol; Apple's runtime provides _objc_msgSend.

objc-rs widened the predicate to target_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's objc usage sits entirely within the API 0.2 and 0.3 share, so nothing needed adapting.

Verification

cargo build clean on every Apple target:

target
aarch64-apple-darwin
aarch64-apple-ios
aarch64-apple-ios-sim
aarch64-apple-tvos
aarch64-apple-tvos-sim

I also checked the symptom directly rather than trusting the build: the tvOS rlib contains zero _objc_msg_lookup references 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 for objc-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.

`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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Bump objc-rs pin to 0.3 so tvOS/watchOS/visionOS can link

1 participant