|
| 1 | +# Swift Runtime Libraries |
| 2 | + |
| 3 | +This directory contains the pieces of the Swift runtime libraries. |
| 4 | + |
| 5 | +## Layering |
| 6 | + |
| 7 | +``` |
| 8 | +╔═══════════════╗ |
| 9 | +║ ║ |
| 10 | +║ Testing ║ |
| 11 | +║ ║ |
| 12 | +╠───────────────╣ |
| 13 | +│ │ |
| 14 | +│ Supplemental │ |
| 15 | +│ │ |
| 16 | +├───────────────┤ |
| 17 | +│ │ |
| 18 | +│ Overlay │ |
| 19 | +│ │ |
| 20 | +├───────────────┤ |
| 21 | +│ │ |
| 22 | +│ Core │ |
| 23 | +│ │ |
| 24 | +└───────────────┘ |
| 25 | +``` |
| 26 | + |
| 27 | +### Core |
| 28 | + |
| 29 | +The _Core_ project contains the basic datatypes and underpinnings used by the |
| 30 | +rest of the libraries that make up the standard library. The _Core_ libraries |
| 31 | +must be built first. |
| 32 | +The _Core_ project provides the following libraries: |
| 33 | + - `swiftCore` |
| 34 | + - `swift_Concurrency` |
| 35 | + - `SwiftOnoneSupport` |
| 36 | + - `CommandLine` |
| 37 | + - `Demangling` |
| 38 | + - `Runtime` |
| 39 | + - `LLVMSupport` |
| 40 | + - `StdlibStubs` |
| 41 | + - `Threading` |
| 42 | + - `SwiftShim` |
| 43 | + |
| 44 | +These libraries must work across the platforms that Swift supports. |
| 45 | + |
| 46 | +### Overlay |
| 47 | + |
| 48 | +The Overlay project contains a few default platform overlay libraries. A |
| 49 | +platform overlay is responsible for exposing the system libraries into Swift in |
| 50 | +an ergonomic fashion. On most systems, this exposes the C standard library and a |
| 51 | +few other libraries that are normally available on that system. The overlay |
| 52 | +libraries are allowed to depend on any of the runtime libraries provided by the |
| 53 | +_Core_ project and libraries distributed by the platform. |
| 54 | + |
| 55 | +The platform overlay is specific to the platform that it overlays and cannot be |
| 56 | +used across platforms. |
| 57 | + |
| 58 | +### Supplemental |
| 59 | + |
| 60 | +The supplemental libraries provide the remainder of the standard distribution of |
| 61 | +libraries provided by Swift. |
| 62 | + |
| 63 | +The Supplemental libraries include: |
| 64 | + - `RegexParser` |
| 65 | + - `StringProcessing` |
| 66 | + - `RegexBuilder` |
| 67 | + - `Cxx Interop` |
| 68 | + - `Synchronization` |
| 69 | + - `Distributed` |
| 70 | + - `Observation` |
| 71 | + |
| 72 | +The behavior of these libraries may differ slightly based on the behavior of the |
| 73 | +underlying operating system. These libraries are allowed to depend on the |
| 74 | +platform overlay and the libraries provided by the _Core_ project. |
| 75 | + |
| 76 | +### Testing |
| 77 | + |
| 78 | +The testing project provides testing support for the libraries that make up the |
| 79 | +standard library. These libraries are optional and are not intended for |
| 80 | +shipping. They must be built last, after the Core, the Overlay, and the |
| 81 | +Supplemental libraries. |
0 commit comments