apple/swift
Libraries
The Swift toolchain ships a number of Swift modules alongside the compiler. They divide into:
- The standard library (
Swiftmodule) -- the always-imported core types and protocols. - Concurrency runtime modules --
_Concurrency,Distributed,Synchronization,Observation,Volatile. - String processing --
_StringProcessing,RegexBuilder,RegexParser. - Differentiation --
_Differentiation. - C++ interop --
Cxx,CxxStdlib. - Embedded --
EmbeddedPlatformand theSwiftDirectRuntime. - Reflection / remote inspection --
_RemoteInspection,SwiftRemoteMirror. - Compatibility shims --
CompatibilityOverride,SwiftOnoneSupport,LLVMSupport,SwiftShims.
This section documents the larger ones individually. The smaller modules are summarized below.
Pages
- Standard library
- Concurrency
- String processing and Regex
- Distributed actors
- C++ interop overlay
- Embedded Swift
- Runtimes -- the alternative stdlib build
Smaller modules at a glance
| Module | Code | Purpose |
|---|---|---|
Observation |
stdlib/public/Observation/ |
The @Observable macro + runtime support for SwiftUI-style observation. |
Synchronization |
stdlib/public/Synchronization/ |
Atomic<T>, Mutex, WordPair etc. |
Volatile |
stdlib/public/Volatile/ |
VolatileMappedRegister<T> for memory-mapped IO (embedded). |
_Differentiation |
stdlib/public/Differentiation/ |
Runtime support for the differentiable programming feature. |
_RemoteInspection |
stdlib/public/RemoteInspection/ |
Reflective enumeration of remote heap objects. |
SwiftRemoteMirror |
stdlib/public/SwiftRemoteMirror/ |
The C library used by swift-inspect and Xcode's memory tools. |
SwiftOnoneSupport |
stdlib/public/SwiftOnoneSupport/ |
Hand-written specializations to keep -Onone builds fast. |
SwiftShims |
stdlib/public/SwiftShims/ |
Headers shared between C++ runtime and Swift stdlib. |
LLVMSupport |
stdlib/public/LLVMSupport/ |
A minimal subset of llvm/ADT/ available in the runtime. |
CompatibilityOverride |
stdlib/public/CompatibilityOverride/ |
Mechanism for back-deployed runtime fixes ("compat50", etc.). |
RegexParser |
stdlib/public/RegexParser/ |
The internal regex literal parser. |
Cxx |
stdlib/public/Cxx/ |
The C++ interop overlay (see C++ interop). |
Platform overlays |
stdlib/public/Platform/ |
C standard library overlays per platform. |
SDK overlays |
stdlib/public/ClangOverlays/ |
Overlays for SDK-bundled C libs. |
WinSDK |
stdlib/public/Windows/ |
Windows SDK overlays. |
_StringProcessing |
stdlib/public/StringProcessing/ |
Internal regex match engine. |
RegexBuilder |
stdlib/public/RegexBuilder/ |
Result-builder DSL for regexes. |
Built by Factory AutoWiki from public repository content. It is a generated preview for codebase exploration, not source-maintained documentation.