Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(query-engine-c-abi): add Mac Catalyst support #4913

Draft
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

hassankhan
Copy link

@hassankhan hassankhan commented Jun 8, 2024

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 the std 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 and query-engine-metrics to disable metrics for query-engine-c-abi. The libraries used by query-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 for query-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

This commit adds a Mac Catalyst target to `query-engine-c-abi`. Because the target is a [Tier 3
platform for Rust](https://doc.rust-lang.org/nightly/rustc/platform-support.html#tier-3), we have
to compile the `std` crate ourselves, so we also need the nightly Rust compiler.
…uilds

This is so that we can build for React Native without the metrics altogether.

The libraries used by `query-engine-metrics` seem to have multiple versions installed as-per the Cargo lockfile, and strangely the issue only manifests itself when building for the Mac Catalyst target.
@CLAassistant
Copy link

CLAassistant commented Jun 8, 2024

CLA assistant check
All committers have signed the CLA.

Copy link

codspeed-hq bot commented Jun 8, 2024

CodSpeed Performance Report

Merging #4913 will not alter performance

Comparing twodoorsdev:@hassankhan/react-native/add-mac-catalyst (2ee978a) with main (9ee8c02)

Summary

✅ 11 untouched benchmarks

@medz medz mentioned this pull request Jul 16, 2024
6 tasks
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.

None yet

2 participants