Approach to Apple support

Open
#5,726 2 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
5/5
Estimated time
Over a week
Newbie friendliness
25/100
Issue type
Feature
Clarity
Needs clarification
Activity status
Active
Tech stack
rust
Domain
backend

Research direction

Read the linked discussions in issues #5650 and #5693, then review how libc marks constants as unavailable across Apple platforms. The issue proposes treating constants present on macOS as available on all Apple platforms, but does not identify specific constants, files, or tests; done would require a decided support policy and corresponding changes.

Written by the indexing model from the issue text.

Description

As per the discussion here and here constants are marked as not present on Apple platforms e.g. iOS based on the presence of them of in Apple SDKs.

However they are available on all platforms. The headers just aren't there.

Removing them seems misguided because:

a) Not every app is going to be published to the App Store.
b) The choice about whether they should be used is ultimately a developer decision.
c) There are 100s of iOS apps which are making use of them.
d) There is a big difference between what Apple would like developers to do versus what they are actually upset about.
e) It seems an impossible situation where if Apple removes a header in say iOS 27 but you are targeting iOS 26 then you can't upgrade libc, nix, Tokio etc. Your entire codebase gets dictated by libc. There needs to be some long term stability for libc.

Given all of this it seems like honouring semvar (and thus support for older targets) should be the ultimate priority and if it is available on macOS it should be assumed to be available on all Apple platforms.

Dominant language
Rust
Stars
2.6k
Forks
1.3k
Avg merge
2d 13h
Merged PRs (30d)
27

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from rust-lang/libc

All issues in rust-lang/libc

Similar issues

More Rust issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.