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

Support for watchOS platform? #74

Open
c-st opened this issue Aug 27, 2023 · 3 comments
Open

Support for watchOS platform? #74

c-st opened this issue Aug 27, 2023 · 3 comments
Labels
enhancement New feature or request

Comments

@c-st
Copy link

c-st commented Aug 27, 2023

I'm currently building an app based on Automerge and I'm using this Package for my iOS app. It has been working really well so far.

Now I'm about to start developing the Watch App counterpart for my app and it seems that automergeFFI.xcframework is not yet built for watchOS and watchOS simulator.

I don't know the Rust ecosystem well, but it seems that watchOS is supported as compile target: https://doc.rust-lang.org/rustc/platform-support/apple-watchos.html

Would it be possible to also compile the framework for these platforms?

@heckj
Copy link
Collaborator

heckj commented Oct 20, 2023

hey @c-st - we can certainly give it a shot. If that's something you're familiar with, the core the logic would all be encapsulated within https://github.com/automerge/automerge-swift/blob/main/scripts/build-xcframework.sh, which we recently updated to move to a more recent nightly version of Swift to continue the macCatalyst support.

If you're game for a PR, definitely drop it in place, otherwise I'll try and circle back to this fairly shortly and see what I can do to try it out and see if it's as "easy" as I'd hope. (there's some creaki-ness in macCatalyst support - being a tier3 platform means that you need to use a nightly version of Rust to build it all).

@heckj heckj added the enhancement New feature or request label Oct 20, 2023
@heckj
Copy link
Collaborator

heckj commented Oct 28, 2023

I spent a few minutes today exploring, the the Rust nightlies are reporting that the watchOS specific targets aren't supported for their version. This isn't a space I'm super familiar with, but when I dug around, I did find an explicit list of "supported targets" using rustup target list - and none of the ones listed at https://doc.rust-lang.org/rustc/platform-support/apple-watchos.html were available.

I'm going to continue digging to see how/where they ARE supported, as they're clearly in there somewhere based on those docs, but it doesn't appear to be well defined. The issue rust-lang/rust#48862 makes somewhat conflicting statements, including that Apple's LLVM being required for some of the watchOS based targets - so that information may be incorrect. I'll keep digging, but wanted to put up an update.

@heckj
Copy link
Collaborator

heckj commented Oct 29, 2023

Still tucking around - there's an option for printing Rust's target supports that I found on StackOverflow - the result of this makes me think it IS there in the nightly we're using, I just haven't sorted out how to unlock it.

rustc +nightly -Z unstable-options --print all-target-specs-json | jq '[ to_entries[] | { "target": .key, "arch": .value.arch, "os": .value.os, "target-family": .value."target-family" } ]'

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants