You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: CLAUDE.md
+40Lines changed: 40 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -313,6 +313,46 @@ cmake --build build
313
313
ls build/benchmarks/ # Check what was built
314
314
```
315
315
316
+
## ABI Compatibility Rules
317
+
318
+
Ada is a shared library used by downstream distributors (e.g., Debian packages). Breaking the ABI causes runtime failures for users who upgrade without recompiling.
319
+
320
+
### Rules for Public API Changes
321
+
322
+
-**Never remove or rename a public method** declared in `include/ada/`. Removing a method removes its exported symbol from the shared library, which is an ABI break.
323
+
-**Never change the signature** of a public method (parameter types, return type, `const`/`noexcept` qualifiers).
324
+
-**Never make a non-inline method inline** (or vice versa) if it is part of the public API — this changes whether the symbol is emitted in the `.so`.
325
+
- Adding new public methods is always safe.
326
+
327
+
### Keeping Methods Exported
328
+
329
+
Internal-use methods that must remain exported (e.g., called from templates or inline functions in headers) **must be defined in a `.cpp` file**, not in a `*-inl.h` header. Inline definitions in headers produce weak symbols that the compiler may optimize away, silently breaking the ABI.
330
+
331
+
### Checking for ABI Breakage
332
+
333
+
CI runs `abidiff` (from `libabigail-tools`) to compare the shared library against the latest release tag. You can run the same check locally:
0 commit comments