C++ API & ABI Versioning

By Mathieu Ropert

Software keeps changing, but not always as fast as its clients. A key to maintaining a library in the long run is to ensure a proper handling of the changes and their impacts. While it is sometimes necessary to break the API or the ABI, one must first know if and how his changes will translate to impacts on API or ABI.

In this talk I will define API and ABI in terms of impacts on compatibility, explain the difference between breaking and non-breaking changes and present a few techniques to handle them. We will quickly explain what APIs are, with an emphasis on the notion of contracts. Then the usually lesser known notion of ABI will be explained, going over the concepts of mangling, vtable layout and most importantly sizes, alignment and offsets in data structures. Finally we will discuss the two most important versioning strategies today, Semantic Versioning and Live at Head and how they can be used to handle changes to the API and the ABI over time and help clients adapt to them.





Your Privacy

By clicking "Accept Non-Essential Cookies" you agree ACCU can store non-essential cookies on your device and disclose information in accordance with our Privacy Policy and Cookie Policy.

Current Setting: Non-Essential Cookies REJECTED


By clicking "Include Third Party Content" you agree ACCU can forward your IP address to third-party sites (such as YouTube) to enhance the information presented on this site, and that third-party sites may store cookies on your device.

Current Setting: Third Party Content EXCLUDED



Settings can be changed at any time from the Cookie Policy page.