The Swift Package Index logo.Swift Package Index

Has it really been five years since Swift Package Index launched? Read our anniversary blog post!

Adding Wasm and Android compatibility testing


We’re delighted to announce support for compatibility testing of packages on two new Swift platforms, Android and Wasm. This brings the number of platforms we test every package with to 8!

The Swift Package Index compatibility matrix showing columns for the Android and Wasm platforms.

Swift support for Wasm has been in development for a long time, and as of Swift 6.1, it now requires no custom patches:

This is the first stable release we’ve built directly from the official swiftlang/swift source without any custom patches. This means all components (compiler, stdlib, Foundation, XCTest, swift-testing, etc.) have been fully upstreamed.

Swift on Android is also receiving plenty of community effort, including a recent announcement of a community working group. The swift-everywhere.org site has also been tracking Android compatibility for several months.

Plenty of work went into making Swift work on these platforms, and it seemed like a great time to add them to our compatibility testing. So we did! For the past week, the Swift Package Index build system has processed 35,000 builds to test compatibility. As of today, all builds are complete, and you can see Wasm and Android compatibility on every package page.

Results

Of ~9,000 indexed packages, 18.9% build for Wasm and 27.9% build for Android. We find that remarkable, given that reliance on Apple-specific frameworks automatically makes many packages incompatible.

It’s safe to say that Swift is expanding beyond its Apple-focused roots. Windows and Linux have been officially supported for years, and Wasm and Android are starting to make their way down that path. It’s great to see.


About this blog

The Swift Package Index is a search engine and metadata index for Swift packages. Our main goal is to help you make better decisions about the dependencies you include in your apps and projects. If you're new here, the best place to get started is by searching for packages.