Conversation
kabiroberai
left a comment
There was a problem hiding this comment.
Nice! Wanna add a CI job as well? Should be able to cross compile on Linux with the Swift SDK.
@kabiroberai Added CI build green at https://github.com/hpr/xtool/actions/runs/32047498390, but it depends on xtool-org/xtool-core#2 and saagarjha/unxip#41. |
|
Tagged the xtool-core commit. PR looks good now, once saagarjha/unxip#41 lands (I left another comment there about a fix you'll need to make for GNU/Linux) |
7f58b4c to
7808b20
Compare
|
Navigate logical layers of code changes, visualize relationships, and explore their blast radius. Note Currently processing new changes in this PR. This may take a few minutes, please wait... ⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Advanced Run ID: ⛔ Files ignored due to path filters (1)
📒 Files selected for processing (17)
✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
8dbb966 to
f9f7eb3
Compare
f9f7eb3 to
8553f15
Compare
This makes xtool build and run natively on Android with the Swift Android toolchain (tested on aarch64 Termux). All changes are additive platform guards; no behavior change on existing platforms.
Subprocess,AsyncHTTPClient,OpenAPIAsyncHTTPClient,WebSocketKit, andXADIdependencies on Android, matching Linux (Package.resolvedupdated accordingly).HTTPClienton Android too — the URLSession-based client needs Darwin-onlyURLSessionWebSocketTask. Also, bionic'sFILEis an incomplete type, sostdoutSafeis anOpaquePointerthere.Androidoverlay where needed (SIG_IGN,flock,errno); bionic markssignal()warn_unused_result.Companion PRs for the dependencies, required for an end-to-end Android build:
One remaining quirk when building on-device: SwiftPM doesn't pass swift-subprocess'
_SubprocessCShimsmodule map to dependents, so I had to build with-Xswiftc -Xcc -Xswiftc -fmodule-map-file=.../_SubprocessCShims/include/module.modulemap. This looks like a SwiftPM/Android toolchain issue rather than something xtool should work around, but I'm happy to add a note to the docs if you'd like.Summary by CodeRabbit
New Features
Documentation
Chores