-
-
Notifications
You must be signed in to change notification settings - Fork 6
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
Add support for Android and iOS #7
Conversation
Awesome! Diff looks good. Would you mind adding CI runs for this? It should only be a matter of adding targets here, just like there is for FreeBSD. You might have to rebase because of a commit I just pushed up; I realized while typing this comment that there was some extraneous stuff in the CI file. I don't think you'll have to if you append the new runs, though. |
9b307c4
to
012bed7
Compare
I'm not sure why the iOS typechecking job is failing. My best guess is that Rust 1.28 didn't support the |
Hmm…that's probably correct. Let me do some digging to see what version it was introduced in. |
I can't immediately determine what version it was introduced in, as it's not mentioned in the release notes. However, it looks like it could only be built on MacOS prior to 1.56. How familiar are you with GitHub Actions? I think the best way would be to run on |
I can give this a try 👍 |
5f70134
to
9611a5e
Compare
CI looks green to me now. Please let me know if there are tweaks you'd like made to it. |
The MacOS check doesn't actually need to be on MacOS, as it works as expected on the Ubuntu host. But that's not a big deal. Thanks! |
This PR adds support for compiling and running on Android and iOS devices.
Test Code
Android
This patch is very simple, as the existing Linux implementation already works great inside the Android app sandbox.
This was tested on both a physical Android device and in an emulator by compiling, then loading, a minimal Rust dylib via the JNI.
Output (note the thread count is always high because of the JVM in the process):
iOS
The patch for iOS, like Android, is very simple because the MacOS implementation can be reused entirely with no changes.
This was tested inside the iOS simulator and on a physical iPad.
Output (the thread count here is high too because of the Swift runtime):