Jul 05, 2019 • ☕️ 3 min read
The Swift 5 release will provide ABI stability for the Swift Standard Library. ABI stability enables OS vendors to embed a Swift Standard Library and runtime in the OS that is compatible with applications built with Swift 5 or later.
Don’t confuse with API which consists of data types, structures, constants, functions that you can use in your code to access the functionality of that external component. Whereas the ABI defines the structures and methods that your compiled application will use to access the compiled external library only on a lower level.
ABI (Application Binary Interface) is the specification to which independently compiled binary entities must conform to: how to call functions, how their data is represented in memory, where their metadata is and how to access it and how an application should make system calls to the operating system.
ABI Stability means locking down the ABI to the point that future compiler versions can produce binaries conforming to the stable ABI. It enables binary compatibility between applications and libraries compiled with different Swift versions.
Before Swift 5, application built with a Swift dynamic library is going to be embedded to that bundle, in order to support your specific Swift version. This leads to bigger app sizes, and version incompatibility issues.
ABI stability is about mixing versions of Swift at run time. Swift 5 reached an important milestone when supporting stable ABI. Here are some benefits it brings to the maturity of language itself and the ultimate benefit to the Swift ecosystem:
What follows is a breakdown of the different kinds of components in Swift ABI and what needs to be specified.
The challenges to maintain binary compatibility when you’re shipping frameworks in binary form:
I've been writing blog posts since 2017 but haven't learned technical writing properly as a writer
Some of the most fundamental concepts which control how CSS is applied to HTML and how conflicts are resolved
Grunt and Gulp are two popular tools to automate repetitive, mundane, painful and time-consuming tasks effectively
Create React App, Styled Components, Material UI, Next.js, Gatsby, Typography.js, React Admin, Formik, Enzyme, React Markdown