Clarifying Supported Platforms for Swift

Recently, Swift moved from Apple's GitHub to its own GitHub organization. I think this is Apple's effort to make Swift more open and community-driven, and I want to say thank you to Apple for that.

To have broader community involvement, I think it is time to clarify the supported platforms for Swift. Currently, Swift supports the three major platforms: macOS, Linux, and Windows, which is good. Additionally, Swift has a page for platform support[1]. While having "Deployment and Development" and "Development-only" platforms is a good start, I believe a more detailed and structured approach would benefit the community and users. I suggest adopting a tiered platform support system similar to other popular projects like Go[2][3], Rust[4], and Node.js[5].

Having tiered platform support provides several benefits:

  1. Clarity: Users and contributors can easily identify which platforms are officially supported, community-supported, or unsupported.

  2. Resource Allocation: Apple and the Swift team can allocate resources more effectively by prioritizing Tier 1 platforms for official support. Community members can also contribute to Tier 2 platforms knowing that their efforts are valuable.

  3. Expectation Management: Clear tier distinctions help set expectations for users regarding the level of support and stability on different platforms.

  4. Flexibility: The tiered system allows for dynamic promotion or demotion of platforms based on community involvement and platform stability, which would be beneficial as the Swift project evolves.

Here's a proposed tiered platform support system for Swift. I borrowed some ideas from existing tiered systems, especially Go, Rust, and Node.js:

Tier 1: Officially Supported Platforms

  • Definition: Platforms that receive official support from Apple with guaranteed stability and regular updates. These platforms are recommended for production use.
  • Platforms:
    • macOS
    • Windows
    • Ubuntu (supported versions) with glibc
    • RHEL UBI9 with glibc
    • Amazon Linux 2 with glibc

Tier 1 with Runtime Support

  • Definition: Platforms that receive official support from Apple, but only for runtime execution.
  • Platforms:
    • Apples other platforms except macOS
    • Android
    • Wasm

Tier 2: Community-Supported Platforms

  • Definition: Platforms supported by the community, with build and test infrastructure in place. These platforms may have limitations, and build failures are not blockers for Swift releases. Tier 2 platforms need dedicated maintainers.
  • Platforms:
    • Various other Linux distributions that are integrated into the swift-ci infrastructure

Unsupported Platforms

  • Definition: Platforms that are neither officially supported by Apple nor actively maintained by the community. Contributions for these platforms are welcome, but they do not have dedicated build and test infrastructure.

Policy for Tier Changes

  • Promotion:
    • Platforms can be promoted from Tier 2 to Tier 1 based on community support and stability criteria, and if the Swift core team is willing to support the platform.
    • A platform can be added to Tier 2 if it gains community support and has a working build and test infrastructure, with dedicated maintainers.
  • Demotion:
    • Platforms can be demoted to unsupported status if they lack community maintenance or fail to meet stability benchmarks over time. This also applies if the platform is not maintained by the community for a long time.

Adopting a tiered platform support system for Swift would enhance clarity, resource allocation, and community involvement, ultimately contributing to the project's robustness and growth.

Since it is my first time writing a suggestion for Swift, I may have made some errors. If you find any, please let me know. Also, if this suggestion receives positive responses, I will write a formal proposal for it. Thank you for considering this suggestion.

References:
[1]: Swift.org - Platform Support
[2]: Go Wiki: Minimum Requirements - The Go Programming Language
[3]: Go Wiki: PortingPolicy - The Go Programming Language
[4]: Platform Support - The rustc book
[5]: node/BUILDING.md at main · nodejs/node · GitHub

17 Likes

It's a good idea, but I think the bigger issue is organizing people to maintain such platform support. I don't think Apple should be expected to maintain Swift for platforms it doesn't use, so the real work is in organizing all the contributors to work together on this.

2 Likes

I believe this is all part of the mission of the recently-created Platform Steering Group, with things such as defining platform support tiers being part of the group's charter.

I don't know if the group has communicated its exact process for reviewing and adopting guidelines yet.

// @al45tair

2 Likes

Thanks for the information, I didn't know that. As you said, it seems like my suggestions all belong to the Platform Steering Group, so I will wait for their guidelines.

1 Like

Thanks for this; it's an area that we know we need to think about, and indeed @compnerd is working on a Vision Document on exactly this topic, I believe.

I don't want to pre-empt what @compnerd has to say on this, but looking over what you've proposed, it seems broadly sensible, though I would change “official support from Apple” to “official support from the Swift Team”. Most of the work on Windows, Android and Wasm has come from outside of Apple, and while Apple is undeniably an outsized contributor to Swift as a whole, there are significant community efforts underway in various areas, including platform support.

8 Likes