Skip to content

Raise minimum supported macOS and iOS versions #556

Closed
@BlackHoleFox

Description

@BlackHoleFox

Proposal

I propose to raise the minimum versions to macOS 10.12 (Sierra) and iOS 10 to better match recent expectations for developers publishing on these platforms and to clean up the compiler and standard library. Additionally, the minimum tvOS version would be raised to 10 as well to match iOS.

rustc and the standard library currently support back to macOS 10.7 (OSX Lion) and iOS 7. However, both of these versions have long since been marked deprecated and unsupported by Apple, not having received an update for 9 to 8 years, respectively. While that may not be extremely old for other platforms such as Linux, the Apple ecosystem is known for most of its userbase staying on modern versions. Both macOS 10.12, iOS 10, and tvOS 10 use the same kernel, Darwin v16. By increasing each's minimum version at the same time, problem cases where APIs are available only on one OS can be avoided, which prevents unnessecarily cluttering the stdlib.

macOS specific

Looking at what versions other programming languages support:

Language Supported version
Go1 10.13+
Zig (unofficial)2 10.12+
Swift3 10.9+ (with bundled runtime)
Java[^4] 10.15+
Python 34 10.9+
Julia5 10.9+

One more point worth noting is that all major browsers have dropped support for versions prior to 10.12 (or more):

Browser Supported version
Firefox6 10.12+
Chrome7 8 10.13+
Safari 10.15+ (Safari 12 was the last supported by 10.12)

A final set of data points is some of the Rust ecosystem:

iOS specific

According to Apple's app store stats, 82% of all iPhones use iOS 15, and, going back further 96% of devices have iOS 13 at a minimum. Given the proposed increase to iOS 10, this shows that an incredibly small number of devices still run iOS 9 and earlier. This is in stark constrast to something like Android, where old OS versions linger for many years past official vendor support.

Additionally, Apple semi-recently has begun requiring all mobile apps submited to app store to use XCode 13, with the iOS 15 SDK. This requires iOS 9 as the minimum deployment target, and iOS 10 in the simulator. A requirement of iOS 10 would also bring the minimum device requirement from the iPhone 4 (2010) to the iPhone 5 (2012). Given Apple's cadence bumping the SDK requirement, iOS 9 will most likely be unsupported in 1-2 years for new app versions.

Winit also requires iOS 8. It has 3,693,208 total downloads (156,839/month). No other (public) crates seem to define a minimum iOS version beyond what Rust specifies using IPHONEOS_DEPLOYMENT_TARGET.

Possible improvements

Both the standard library and some parts of the compiler would be simplified via this proposal:

On top of that, it brings some other nicities that could be used for future improvements:

  • os_unfair_lock to improve some stdlib internals.
  • Misc other unifications from better UNIX compatibility.

What about Swift?

A past counterpoint has been that Apple's Swift language supports running on back to macOS 10.9 and iOS 7. However, I'm not of the belief this is a fair standard for a static, 3rd-party language like Rust. Swift is directly supported by Apple and therefore can have more OS-level support for backwards compatibility then any other language. This includes numerous backwards compatibility shims and hot patching of older runtime versions. Since Rust has no underlying runtime provided by the operating system, it should not have the same expectations of extreme backwards compat.

Mentors or Reviewers

@thomcc - reviewer mentor

Process

The main points of the Major Change Process are as follows:

  • File an issue describing the proposal.
  • A compiler team member or contributor who is knowledgeable in the area can second by writing @rustbot second.
    • Finding a "second" suffices for internal changes. If however, you are proposing a new public-facing feature, such as a -C flag, then full team check-off is required.
    • Compiler team members can initiate a check-off via @rfcbot fcp merge on either the MCP or the PR.
  • Once an MCP is seconded, the Final Comment Period begins. If no objections are raised after 10 days, the MCP is considered approved.

You can read more about Major Change Proposals on forge.

Comments

This issue is not meant to be used for technical discussion. There is a Zulip stream for that. Use this issue to leave procedural comments, such as volunteering to review, indicating that you second the proposal (or third, etc), or raising a concern that you would like to be addressed.

Footnotes

  1. https://go.dev/dl/

  2. https://github.com/ziglang/zig/pull/9545

  3. https://www.swift.org/platform-support/

  4. https://www.python.org/downloads/release/python-3106/

  5. https://julialang.org/downloads/platform/#macos

  6. https://www.mozilla.org/en-US/firefox/104.0.1/system-requirements/

  7. https://www.google.com/chrome/

  8. https://bugs.chromium.org/p/chromium/issues/detail?id=1322548

Metadata

Metadata

Assignees

No one assigned

    Labels

    T-compilerAdd this label so rfcbot knows to poll the compiler teammajor-changeA proposal to make a major change to rustcmajor-change-acceptedA major change proposal that was accepted

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions