loud-fireman-50347
09/22/2025, 9:22 AMtall-airline-16756
09/22/2025, 9:22 AMtall-airline-16756
09/22/2025, 9:22 AMloud-fireman-50347
09/22/2025, 9:27 AMaarch64-apple-visionos (device)
• aarch64-apple-visionos-sim (simulator)
◦ as documented by rustc platform support. (doc.rust-lang.org)
2) Dependencies I’m aligning to
• LiveKit WebRTC XCFramework that already ships visionOS slices (device + sim). (If there’s a preferred version/commit, please advise.) (The Swift Package Index)
• Unity SDK (client-sdk-unity) as the C# surface; I’m aware visionOS isn’t in the listed supported platforms yet, so I’m preparing to produce my own ffi-visionos build. (GitHub)
3) What I’ve tried / plan to try
• Build livekit-ffi for the two visionOS Rust targets above and package into an XCFramework using:
• xcodebuild -create-xcframework \
• -library path/to/device/liblivekit_ffi.a -headers path/to/device/Headers \
• -library path/to/sim/liblivekit_ffi.a -headers path/to/sim/Headers \
• -output LiveKitFFI.xcframework
• (Apple’s guidance is to use -create-xcframework for multi-platform bundles.) (Apple Developer)
• Link against LiveKitWebRTC XCFramework that includes visionOS; ensure both device + sim slices are present to avoid the classic “no library for this platform” error on the simulator. (The Swift Package Index)
• Unity side: import the XCFramework under Assets/Plugins/ and enable for visionOS in the Plugin Inspector (not iOS), then gate any platform logic with the proper defines/runtime checks. (Unity visionOS build guidance sits under PolySpatial docs.) (Unity Documentation)
4) Specific questions where guidance would help
1. Correct Rust target setup:
◦ Are there LiveKit-specific build flags or environment variables (e.g., min deployment target) I should set when targeting aarch64-apple-visionos(-sim)? rustc docs mention XROS_DEPLOYMENT_TARGET. Any recommendations from the LiveKit side? (GitHub)
2. Exact WebRTC dependency & versions:
◦ Which LiveKitWebRTC release/tag should I pin that’s verified with current LiveKit FFI for visionOS? Swift Package Index shows visionOS support; want to avoid ABI mismatches. (The Swift Package Index)
3. FFI feature flags:
◦ Are there any cfg/feature flags in livekit-ffi that need to change for visionOS (e.g., APIs unavailable compared to iOS, or transport nuances)?
4. Frameworks & entitlements:
◦ For visionOS, I’m assuming VideoToolbox and Network remain required; anything else specifically for visionOS vs. iOS (and anything to explicitly remove, e.g., OpenGLES/GLKit)?
5. Simulator gotchas:
◦ Historically, simulators fail with “no library for this platform found in WebRTC.xcframework” when slices are missing; is there a known-good simulator slice combo for LiveKit + visionOS you recommend? (There’s prior discussion on visionOS support/slices in the Swift SDK issue tracker.) (GitHub)
6. Minimum deployment target:
◦ Any guidance on visionOS minimum for FFI (1.0 vs 2.x)? Swift docs/indices say visionOS is supported, but I’d like the canonical target you test against. (LiveKit Docs)
5) What success would look like (acceptance checks)
• LiveKitFFI.xcframework contains device + simulator variants for visionOS, loads on Vision Pro and sim.
• Can publish/subscribe audio+video; no linker errors; no missing symbol errors from WebRTC or media subsystems.
• Unity can consume decoded frames via my existing texture path (Metal-backed textures) within a PolySpatial volume/window.
6) Happy to provide
• CI logs for Rust/Cargo and xcodebuild runs for both targets.
• A minimal Unity sample (PolySpatial scene) + Xcode project demonstrating the FFI being loaded.
• If helpful, I can also validate an official ffi-visionos drop in my plugin once you provide it.
If you’d rather recommend I bridge to the Swift SDK for visionOS while Unity FFI is being sorted, I can do that too (Swift SDK explicitly lists visionOS support). But I’d prefer staying all-Unity if we can get a verified ffi-visionos. (LiveKit Docs)tall-airline-16756
09/22/2025, 9:28 AM