Factory.ai

Open-Source Wikis

/

Swift

/

Lore

apple/swift

Lore

A timeline of how the Swift compiler repository got to where it is today. Dates are derived from git history, public release announcements, and tag dates in this repo.

Eras

The pre-Swift era (Jul 2010 – Jun 2014)

The repo's first commit -- initial swift test -- was made on 2010-07-17, four years before Swift was announced publicly. The earliest commits ("sketch out lexer and token interfaces", "consolidate lexer stuff into the Parser lib") show Chris Lattner and a small team building a parser, an AST, and an early type checker. For roughly four years, Swift was an internal Apple project, sometimes referred to as shiny. SIL was conceived in this era; so was swift -frontend as the per-file compile entry point.

Public launch and 1.x (Jun 2014 – Sep 2015)

Swift was unveiled at WWDC 2014. The repo was opened to the public in December 2015. Swift 1.0 (Sep 2014) and Swift 1.1 (Oct 2014 with Xcode 6.1) shipped before open-sourcing. The first open-sourced release, Swift 2.2 (Mar 2016), introduced the now-familiar PR-based development workflow on this repo.

Stabilization and source compatibility (Sep 2015 – Sep 2017)

This era covered Swift 2.2, 3.0 (Sep 2016), and 4.0 (Sep 2017). Swift 3 was the famously source-breaking release that established naming conventions ("omit needless words" -- see docs/CToSwiftNameTranslation-OmitNeedlessWords.md). Swift 4 introduced the encoding/decoding system, Codable, and the migrator (lib/Migrator/).

ABI stability and library evolution (Sep 2017 – Mar 2019)

Swift 4 and 5 work fixed ABI on Apple platforms. The stable mangler (docs/ABI/Mangling.rst), library evolution (docs/LibraryEvolution.rst, -enable-library-evolution), and resilient layouts shipped here. Swift 5.0 (Mar 2019) declared ABI stability on Apple platforms.

Generics and ownership rework (2018 – 2021)

Long-running rewrites in this era:

  • The original generic signature builder was replaced by the Requirement Machine (lib/AST/RequirementMachine/) -- a Knuth-Bendix-style completion procedure derived from the Compiling Swift Generics book in docs/Generics/.
  • SIL gained an explicit ownership phase: every value has an ownership kind (owned, guaranteed, unowned, none). OSSA passes were enabled by default, and many old passes had to be rewritten.

Concurrency (Jun 2020 – present)

stdlib/public/Concurrency/ first appears in 2020. Swift 5.5 (Sep 2021) shipped structured concurrency, actors, async/await, and the actor model. Subsequent releases hardened the model:

  • Sendable checking and global-actor isolation diagnostics.
  • Distributed actors (stdlib/public/Distributed/).
  • Swift 6 mode (June 2024) flipped data-race-by-default checking to errors.

The concurrency work is one of the largest single feature areas in repo history: test/Concurrency/ has been one of the top-five churn directories every year since 2021.

The Swift-on-Swift era (2022 – present)

In 2022 the project began porting the optimizer from C++ to Swift. SwiftCompilerSources/ was added with Sources/{AST,Basic,SIL,Optimizer}. New SIL passes are now written in Swift -- see SwiftCompilerSources/Sources/Optimizer/FunctionPasses/. By 2026, the directory holds 185 source files and has been one of the top churn areas.

The lexer and parser are also moving Swift-side: lib/ASTGen/ bridges the Swift-implemented swift-syntax parser into the C++ AST.

Embedded, C++ interop, and the second runtime (2023 – present)

Three parallel rewrites:

  • C++ interop (docs/CppInteroperability/, stdlib/public/Cxx/, test/Interop/) -- importing C++ types and templates, with active churn in lib/ClangImporter/.
  • Embedded Swift (docs/EmbeddedSwift/, stdlib/public/EmbeddedPlatform/, test/embedded/) -- a no-runtime, no-allocator dialect for bare-metal targets.
  • Runtimes/ -- a new top-level CMake build of the standard library and overlays, intended as the eventual replacement for the stdlib/ build (Runtimes/Readme.md).

Longest-standing features

Feature Earliest signal Notes
Lexer / parser core Jul 2010 First commits in the repo were the lexer; lib/Parse/ is among the oldest dirs.
SIL ~2012 Documented in docs/SIL/; design predates open source.
ClangImporter ~2013 Required for any Foundation interop; lib/ClangImporter/ is one of the largest libraries.
Constraint-based type checker ~2013 lib/Sema/CSGen.cpp, CSSimplify.cpp -- still the heart of Sema today.
ARC ownership lowering ~2014 Has been rewritten under OSSA but the core semantics are unchanged.
Generics ~2014 Rewritten via the Requirement Machine but the where-clause surface syntax is from the very beginning.

Deprecated / removed features

  • Old generic signature builder -- replaced by the Requirement Machine. Vestiges remain in commit history; the new code is in lib/AST/RequirementMachine/.
  • lib/Syntax -- the in-tree, C++-implemented Syntax tree library was retired in favor of the Swift-implemented swift-syntax repo. References in docs/Lexicon.md still mention it.
  • Old driver (swiftc C++ driver) -- the in-tree lib/Driver/ is increasingly used as a fallback. The default driver is the Swift-implemented swift-driver, invoked via lib/DriverTool/.
  • GenericSignatureBuilder (include/swift/AST/GenericSignatureBuilder.h) -- deleted; minor stubs remain.
  • Swift Playgrounds-only "PlaygroundTransform" still lives in lib/Sema/ and test/PlaygroundTransform/ but is rarely modified.

Major rewrites

  • OSSA SIL (~2018-2020) -- adding ownership annotations to SIL and migrating every pass. Searchable in commit history under "OSSA".
  • Requirement Machine (~2021) -- replaced the generic signature builder; new infrastructure in lib/AST/RequirementMachine/ and the book in docs/Generics/.
  • Swift-implemented optimizer passes (~2022 - present) -- SwiftCompilerSources/Sources/Optimizer/.
  • Swift-implemented parser via ASTGen (~2023 - present) -- lib/ASTGen/.
  • Concurrency (2020 - present) -- the largest sustained feature work since open-sourcing.

Growth trajectory

  • 2010-2014: small internal team; thousands of commits per year.
  • 2014-2016: open-sourced; commit volume grew sharply once the community could contribute.
  • 2018-present: stabilized at ~16-19k commits/year. Contributor count in any 90-day window is in the high three digits. The project has accepted commits from 1,494 distinct authors (deduplicated by name) over its full history.
  • The compiler has shipped 18 numbered minor releases (swift-1.0 through swift-6.3), plus continuous nightly snapshots (the most recent tag in this checkout is swift-DEVELOPMENT-SNAPSHOT-2026-04-28-a).

Built by Factory AutoWiki from public repository content. It is a generated preview for codebase exploration, not source-maintained documentation.

Lore – Swift wiki | Factory