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:
-
Clarity: Users and contributors can easily identify which platforms are officially supported, community-supported, or unsupported.
-
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.
-
Expectation Management: Clear tier distinctions help set expectations for users regarding the level of support and stability on different platforms.
-
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