Swift System Is Now Open Source
In June, Apple introduced Swift System, a new library for Apple platforms that provides idiomatic interfaces to system calls and low-level currency types. Today, I’m excited to announce that we’re open-sourcing System and adding Linux support! Our vision is for System to eventually act as the single home for low-level system interfaces for all supported Swift platforms.
[…]
Errors are thrown using the standard language mechanism and cannot be missed. Further, all system calls interruptible by a signal take a defaulted-true
retryOnInterrupt
argument, causing them to retry on failure. When combined, these two changes dramatically simplify error and signal handling.[…]
System
is a multi-platform library, not a cross-platform one. It provides a separate set of APIs and behaviors on every supported platform, closely reflecting the underlying OS interfaces.
Like Swift Argument Parser, it is not part of the standard library. I guess the advantage is that you can back-deploy the latest version of the package to older OS versions.
Update (2020-09-28): See also: Hacker News.