Source Code

The code for the Swift project is divided into several open-source repositories, all hosted on GitHub.

Compiler and Standard Library

swift
The main Swift repository, which contains the source code for the Swift compiler, standard library, and SourceKit.
swift-evolution
Documents related to the continued evolution of Swift, including goals for upcoming releases proposals for changes to and extensions of Swift.

Directions for building the Swift compiler and standard library, along with its prerequisites, are provided by the main Swift repository’s README file.

Core Libraries

swift-corelibs-foundation
The source code for Foundation, which provides common functionality for all applications.
swift-corelibs-libdispatch
The source code for libdispatch, which provides concurrency primitives for working on multicore hardware.
swift-corelibs-xctest
The source code for XCTest, which provides fundamental testing infrastructure for Swift apps and libraries.

Package Manager

swift-package-manager
The source code for the Swift package manager.
swift-llbuild
The source code for llbuild, a low-level build system used by the Swift package manager.

Xcode Playground Support

swift-xcode-playground-support
The source code to enable playground integration with Xcode.

Cloned Repositories

Swift builds upon several other open-source projects, most notably the LLVM Compiler Infrastructure. Swift’s clones of the repositories of those open-source projects contain Swift-specific changes and are merged regularly from their upstream sources. For more information about the clones of LLVM repositories, see the section on LLVM and Swift.

swift-llvm
The source code for LLVM, with a handful of Swift-specific additions. Merged regularly from the LLVM sources at llvm.org.
swift-clang
The source code for Clang, with a handful of Swift-specific additions. Merged regularly from the Clang sources at llvm.org.
swift-lldb
The source code for the Swift-enabled version of LLDB, for debugging Swift programs. Merged regularly from the LLDB sources at llvm.org.
swift-cmark
The source code for CommonMark, which is used in the Swift compiler.

Directions for building LLDB for Swift are present in the swift-lldb repository’s README file.