madsmtm / objc2

Bindings to Apple's frameworks in Rust
https://docs.rs/objc2/
MIT License
384 stars 43 forks source link

Does this mean that I can use Rust to build an immersive application of CompositorService on visionOS through this project? #668

Open random-yang opened 1 week ago

random-yang commented 1 week ago

Sorry for only asking a primary-level question, but my question is as shown in the title. I am not sure dose it make sence.

madsmtm commented 1 week ago

The quick answer is technically yes, but currently practically no, since we don't expose bindings for the CompositorServices framework, and it's very tedious and error-prone to create them manually.

Even if we did, I would honestly say that as a beginner, you should probably try it with Swift first, there's a lot more documentation available out there for that.

random-yang commented 1 week ago

@madsmtm Thank you for your answer. I have obtained more information. The reason I ask this is to estimate whether the existing Rust 3D rendering can be directly used in AVP development in the future.

madsmtm commented 1 week ago

I think so? The most popular Rust rendering solution, wgpu, uses Metal under the hood, and that should be possible to integrate with CompositerServices, if I understand correctly.

random-yang commented 1 week ago

Currently, CompositerServices and realityKit cannot work in the same immersive environment. This results in the inability to use realityKit to draw other content in the scene while using CompositerServices. Therefore, it is meaningful to find a way to control rendering completely based on CompositerServices. But at the same time, I am also trying my best to find an opportunity to discuss this issue with Apple.