Skip to content

Commit a01e080

Browse files
committed
Adding new standard library readme
Adding a readme describing the different layers for the standard libraries, and what libraries belong to which layer. - Core: The core runtime libraries that provide basic operations - Overlay: Maps the underlying system into Swift - Supplemental: Libraries that use the underlying system - Testing: Extraneous support for testing the standard libraries
1 parent af036fe commit a01e080

File tree

1 file changed

+81
-0
lines changed

1 file changed

+81
-0
lines changed

Runtimes/Readme.md

Lines changed: 81 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,81 @@
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

Comments
 (0)