Apple Opens Swift System and Adds Linux Support


Apple Opens Swift System and Adds Linux Support

In June, Apple introduced Swift System, a new library for Apple platforms that provides interfaces for system calls and low-level types. Now they open the library under Apache License 2.0 and add Linux support! Swift System should become a single place for low-level system interfaces for all supported Swift platforms.

Swift System is a multi-platform library, not cross-platform. It provides a separate set of APIs and behaviors on each supported platform that more closely reflects the underlying OS interfaces. Importing a module will make native platform interfaces specific to a particular operating system available.

Most operating systems today support a certain set of system interfaces written in C that have been around for decades. While these APIs can be used directly from Swift, these weakly typed system interfaces imported from C can be error prone and awkward to use.

The Swift System uses various Swift language features to improve expressiveness and eliminate those opportunities for errors. The result is code that looks and behaves like idiomatic Swift code.

Source: linux.org.ru

Add a comment