Improving Swift support and interoperability experience for Android

An update on the Android port - the new Android overlay that Alex and Saleem proposed was merged into Swift 6 earlier this month and will ship with that toolchain's stable release in a couple months. That just means the Swift 6 compiler supports the new overlay: you will still have to use my prebuilt Android SDK then or build one yourself, using the OSS patches and instructions in my doc there.

In the meantime, my CI puts out builds of Swift 6.0 "devel" and Swift 6.1 trunk SDKs for Android (scroll down for the links to the zip file "Artifacts" that have the SDKs), which you can use with the official snapshot toolchains for linux by following the same procedure for 5.10 outlined in my doc. Simply download the sdk-devel-aarch64 zip file if you want to build for Android AArch64 API 24 with the Swift 6.0 July 19 snapshot toolchain, or similarly, sdk-trunk-x86_64 if targeting Android x86_64 24 with the 6.1 July 15 snapshot toolchain.

I use those particular snapshot toolchain dates because the Foundation rewrite in Swift was merged into the Swift 6 branches this week, and that does not build for Android yet, so I had to disable updating those Swift 6 source snapshots past those dates on my daily Android CI yesterday. I will look into getting the Foundation rewrite building on Android in the coming weeks (@Alex_L, do you have any of it working?).

Also, I want to put out an Android SDK bundle, which is more convenient to cross-compile with, and get the Swift compiler validation suite running for Android on the official CI in the coming months. Hopefully, that will culminate with an official Android SDK bundle on swift.org in the coming year.

12 Likes