ABI Dashboard

Last updated: 3 May 2018

One of the top priorities for Swift right now is compatibility across future Swift versions. One major component of this is ABI stability, which enables binary compatibility between applications and libraries compiled with different versions of Swift. The Swift ABI Manifesto describes the engineering and design tasks that need to be complete before declaring the ABI stable. The following dashboard tracks the progress of these tasks*:

Data Layout

Task Tracking Bug Status Availability
Define efficient layout of partially opaque aggregates SR-3722 Deferred N/A
Determine impact of annotations on a library's types in future versions of the library SR-3911 Deferred N/A
Define layout algorithms for structs SR-3723, SR-3724, SR-3725, SR-3912
Define layout algorithm for tuples SR-3726
Define layout algorithm for payloaded enums SR-3727
Use word-size field in native object header for reference counting SR-4353 Done Swift 4.1
Explore using spare bits in references for ARC optimizations SR-3728 Won't do N/A
Re-evaluate buffer size for existential containers SR-3340 Won't do N/A
Evaluate making out-of-line allocation be copy-on-write SR-4330 Done Swift 4.0
Evaluate converting from an existential parameter into a protocol-constrained generic parameter SR-4331
Create technical specification of the layout algorithms for future compilers SR-3730

Type Metadata

Task Tracking Bug Status Availability
Plan for the evolution of type metadata (including carving out space for future functionality and freezing performance critical areas) SR-3923 Done Swift 4.2
Clean-up historical artifacts in the metadata representation SR-3924 Done Swift 4.2
Present more semantic info and space needed in metadata for future features (e.g. reflection) SR-3925 Won't do N/A
Technical specification for the fixed part of the metadata layout of all language constructs SR-3731
Decide the mangling of names stored in named value type metadata SR-3926 Done Swift 4.2
Review the efficiency of interacting with the enum discriminator through the witness table SR-4332 Done Swift 4.1
Lock down the layout of value witness tables SR-3927 Done Swift 4.1
Decide what class metadata is opaque for library evolution SR-4343
Lock down the layout of vtables or decide to use thunks SR-3928
Lock down the layout of a protocol witness table SR-3732
Decide the layout of existential type metadata, including protocol descriptors SR-4341 Done Swift 4.1
Consider updating the existing tuple-design for function parameters SR-4333 Done Swift 4.2

Mangling

Task Tracking Bug Status Availability
Define canonicalization of generic and protocol requirements for order-agnostic mangling SR-3733 Done Swift 4.1
Review mangling variadicity of function parameters SR-3734 Done Swift 4.0
Investigate not distinguishing between struct/enum SR-3930 Won't do N/A
Investigate dropping internal witness table symbols that aren't useful for debugging SR-3931
Overhaul of word substitution to reduce redundancy in names SR-4344 Done Swift 4.0
Investigate mangling based on known overload set for non-resilient functions SR-3933 Won't do N/A
Redesign type/conformance info manglings to maximize common prefixes SR-3932 Done Swift 4.0

Calling Convention

Task Tracking Bug Status Availability
Adopt the new Swift calling convention SR-4346 Done Swift 4.0
Lock down function signature lowering scheme SR-4349
Determine number of registers to hold return values SR-3946 Done Swift 4.0
Investigate whether to split values with partially opaque layout SR-3947 Deferred N/A

Runtime

Task Tracking Bug Status Availability
Audit of every runtime function for desirability and behavior SR-3735 Done Swift 4.1
Create new runtime APIs or modifications to existing APIs for library evolution and ownership semantics SR-4352

Standard Library

Task Tracking Bug Status Availability
Redesign String SR-4354 In progress
Protocol-oriented integers SR-3196 Done Swift 4.0
Enforce appropriate constraints on Sequences and Collections SR-3453 Done Swift 4.1
Collapse various collection wrappers using conditional conformance SR-3458 Done Swift 4.1

Ownership

Task Tracking Bug Status Availability
Change the convention for passing parameters to "guaranteed" by default SR-7100 Done Swift 4.2
Implement coroutines so that they can be used for robust inout modifications SR-7134
Implement generalized accessors and adopt them in the standard library SR-7135
Support enforcement of exclusive memory accesses in Release builds SR-7139
Implement generators and adopt them in the standard library SR-7140
Implement proof-of-concept for move-only types to make sure the standard library can support move-only data SR-7141

* Note: Tasks may be added as more progress is made.