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

iOS Example: Fix the build to make it work again #1437

Merged
merged 1 commit into from
Mar 16, 2023
Merged

Conversation

badboy
Copy link
Member

@badboy badboy commented Jan 2, 2023

This includes:

  • Correctly calling uniffi-bindgen through cargo.
  • Ditching lipo for individual static libraries per target, that way it easily works on all Mac hardware (x86_64 or arm64) as well as for iOS hardware targets.
  • Build a staticlib using cargo's new --crate-type option

Replaces #1436.
This wills locally on my M1 macbook using Xcode 14.2 and rustc 1.65.0

@badboy badboy requested a review from a team as a code owner January 2, 2023 12:03
@badboy badboy requested review from bendk and removed request for a team January 2, 2023 12:03
Copy link
Member

@mhammond mhammond left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks fine to me, but it is still "broken" due to https://github.com/mozilla/uniffi-rs/blob/main/rust-toolchain.toml forcing me on 1.63 - should we bump that first? (Or soon, I don't really care)

(I was going to suggest a change there might be to note "rustup override ..." in README.md for that example, but that looks quite stale or confused, so 🤷 )

@badboy
Copy link
Member Author

badboy commented Jan 3, 2023

This looks fine to me, but it is still "broken" due to main/rust-toolchain.toml forcing me on 1.63 - should we bump that first? (Or soon, I don't really care)

D'oh! yeah, i've been testing with stable locally here of course. --crate-type was stabilized in 1.64.0. We should just upgrade. I'll do that.

(I was going to suggest a change there might be to note "rustup override ..." in README.md for that example, but that looks quite stale or confused, so 🤷 )

Of course I forgot to even look at the README. I'll also update that (as well as the book).

@badboy badboy force-pushed the working-ios-example branch 2 times, most recently from 7afd574 to d8b3a92 Compare January 4, 2023 16:00
This includes:

* Correctly calling a custom `uniffi-bindgen` through cargo.
* Ditching lipo for individual static libraries per target, that way it
  easily works on all Mac hardware (x86_64 or arm64) as well as for iOS
  hardware targets.
* Build a `staticlib` using cargo's new `--crate-type` option
@badboy badboy force-pushed the working-ios-example branch from d8b3a92 to 9700bc9 Compare March 16, 2023 12:58
@badboy badboy merged commit 1c74f74 into main Mar 16, 2023
@badboy badboy deleted the working-ios-example branch March 16, 2023 13:44
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.

2 participants