View a markdown version of this page

Swift in AL2027 - Amazon Linux 2027
Services or capabilities described in Amazon Web Services documentation might vary by Region. To see the differences applicable to the China Regions, see Getting Started with Amazon Web Services in China (PDF).

Swift in AL2027

AL2027 currently provides the Swift (website) runtime and SDK.

In AL2027, the Swift SDK and runtime are split into separate packages. The swiftlang-lib package contains the runtime libraries, and the swiftlang package contains the full SDK. This allows you to run binaries compiled with the Swift SDK on production hosts without requiring the full SDK to be installed. At this time, different versions of Swift are not ABI compatible. When updating Swift, applications will need to be rebuilt with the new version before they can be deployed.

Note

Like Rust, Swift versions will follow the latest stable version from the Swift project. Packages will not be namespaced, and only one version will be supported at a time.

Some notes on using Swift on AL2027

  • C++ interoperability – The system's package manager clang may not work with Swift. To resolve this, add swift-clang to your PATH or use alternatives to set clang to swift-clang.

  • Debugging Swift code – The system LLDB cannot debug Swift sources. Use the LLDB included with the Swift package instead by adding the Swift installation directory to your PATH or using alternatives to set lldb to swift-lldb.