jhugman / uniffi-bindgen-react-native

A uniffi bindings generator for calling Rust from react-native
https://jhugman.github.io/uniffi-bindgen-react-native/
Other
50 stars 5 forks source link

Default to x86_64-apple-ios if ubrn is built for x86 #135

Closed Johennes closed 1 month ago

Johennes commented 1 month ago

This adds x86_64-apple-ios rather than aarch64-apple-ios-sim to the default targets on iOS if UBRN itself was built for x86.

Given that x86 Macs are slowly becoming extinct, I think, it may not be worth to include both targets by default because it'll result in a lot of pointless compilation.

I believe the ARCH value is baked in at compile time. So this may not work correctly in some edge cases. @trevoranderson, maybe you could give this a test on your Intel Mac?

Fixes: #134

jhugman commented 1 month ago

This is ingenious; I had not thought of this solution. I'm going to land it now.