Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.Sign up
Add Catalyst (iOS apps running on macOS) target #63467
This is a first attempt of adding support for the new Apple Catalyst target (i.e. running iOS apps on macOS). Currently,
Apple Catalyst will add an additional target:
Note, it the actual SDK is the also the macOS 10.15 SDK, but the symbols are the iOS SDK symbols as they were added to macOS with 10.15.
I've collected additional information via links in the open question sections below. This is way out of my comfort zone so please excuse whatever errors I may have made.
It seems to me that
Hardcoded iOS version
I'm probably using the wrong data-layout. I don't know whether it should be the macOS version or the iOS version. This is probably easier to answer for somebody who understands these things much better than me. I just copied the iOS Simulator X86_64 version as it seems to be (based on what I understand) that Catalyst is just the simulator target build against a different SDK.
I'm not sure what needs to be done next. Supposedly I need to compile everything into a toolchain somehow that I can then test via
Thanks for the pull request, and welcome! The Rust team is excited to review your changes, and you should hear from @estebank (or someone else) soon.
If any changes to this PR are deemed necessary, please add them as extra commits. This ensures that the reviewer can see what has changed since they last reviewed the code. Due to the way GitHub handles out-of-date commits, this should also make it reasonably obvious what issues have or haven't been addressed. Large or tricky changes may require several passes of review and changes.
Please see the contribution instructions for more information.
cc @alexcrichton everything seems correct, but I am unsure about:
In general we're extremely liberal with adding new targets to the compiler, so there's not much oversight nor much verification for correctness as targets are added. In that sense if a target wants to be added here before clang, that's ok. We don't really have anyone to say whether that's a good idea or not, it depends on who's adding the target basically to make that judgement call.
In terms of things like target naming, data layout, etc, afaik we don't really have answers and/or someone to answer questions. It's largely up to you adding the target to test it out and make sure it works
@alexcrichton Thanks for the info! I'll try to get this into a custom toolchain then so that I can see if it works as expected.
Just to make sure I'm understanding this correctly. The