to embed a Swift standard library and runtime that is compatible with applications built with older or newer versions of Swift. This would remove the need for apps to distribute their own copy of these libraries on those platforms. It also allows for better decoupling of tools and better integration into the OS. https://github.com/apple/swift/blob/master/docs/ABIStabilityManifesto.md Swift ABI Stability Manifesto - What Does ABI Stability Enable?
version of the Swift compiler will be able to talk to a library built with another version. https://swift.org/blog/abi-stability-and-more/ ABI Stability and More
with other libraries and components through an ABI. ABI is Application Binary Interface, or the specification to which independently compiled binary entities must conform to be linked together and executed. https://github.com/apple/swift/blob/master/docs/ABIStabilityManifesto.md Swift ABI Stability Manifesto
code level interface for your library ‣ How we interface with your library before compilation • ABI: Application Binary Interface ‣ Machine instruction level interface for your library ‣ How we interface with your library after compilation
in-memory layout for instances of type • Type Metadata: a set of defined APIs for querying the metadata of a type • Mangling: any name in source code might not be globally unique, a unique name is produced through a technique called name mangling • Calling Convention: functions must know how to call each other • Runtime: dynamic casting, reference counting, reflection, etc • Standard Library: defines many common types, structures, and operations on these
different versions of the compiler • Explore cases that source code compatible but binary incompatible ‣ Add a default parameter to a public function ‣ Add a function to a struct ‣ Add a stored property to a struct
stability is binary level compatibility • ABI incompatible is where code that has already been compiled against version 1 will no longer work with version 2
Stability Manifesto https://github.com/apple/swift/blob/master/docs/ABIStabilityManifesto.md • Plan for module stability https://forums.swift.org/t/plan-for-module-stability/14551 • Swift Intermediate Language (SIL) https://github.com/apple/swift/blob/master/docs/SIL.rst • How Swift Achieved Dynamic Linking Where Rust Couldn't https://gankra.github.io/blah/swift-abi/