feat(query-engine-c-abi): add Mac Catalyst support #4913
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.
This PR contains two commits.
The first commit adds a Mac Catalyst target to
query-engine-c-abi
. Because the target is a Tier 3 platform for Rust, we have to compile thestd
crate ourselves, so we also need the nightly Rust compiler.In an ideal world, the first commit would've been enough, however I had to make a second commit which does some horrible things to
query-engine-common
andquery-engine-metrics
to disable metrics forquery-engine-c-abi
. The libraries used byquery-engine-metrics
seem to have multiple versions installed according to the Cargo lockfile, and strangely the issue only manifests itself when building for the Mac Catalyst (aarch64-apple-ios-macabi
) target.I'm not a Rust expert by any means, and I am aware Tier 3 platforms might not be something @prisma is interested in, but if anyone with more knowledge could take a look and offer some advice, I'd be most appreciative 😀
In the meantime, this branch does successfully build an
.xcframework
file forquery-engine-c-abi
on the Mac Catalyst platform and I have managed to successfully build and boot my Expo Mac Catalyst application, so I'm leaving this PR as a draft for anyone else that might want to do the same./cc @SevInf @sorenbs @ospfranco