Making Libraries Consumable for Non-C++ Developers
summary
Concrete checklist of what breaks and what to ship: enumerate interop routes used (C API, COM, FFI, SWIG, JNI, P/Invoke, C++/CLI, cgo, Objective‑C runtime) and show one minimal working example for each; list actual failures found—calling convention mismatch, size_t vs long differences, exception crossing ABI, and ambiguous char encoding (use UTF‑8); explain memory models with costs and fixes (manual vs refcount vs moving GC, GC handles and pinning), cost of chatty callbacks, and insist on explicit docs for ownership, packing, and allocator.
AI-written summary · about
chapters (21)
- 0:00Intro
- 1:30Who am I
- 3:35What is interop
- 8:10Common approaches
- 15:05Assumptions
- 17:25GetSize
- 19:30Calling Conventions
- 26:48ObjectiveC
- 28:56Tooling
- 29:44Memory Model
- 30:22Reference Counting Garbage Collection
- 31:43Memory Allocation
- 32:32Reference Counting
- 34:09NonReference Counting
- 38:37Handles
- 40:43Memory
- 44:55Threat Affinity
- 47:00Encoding
- 48:18Interop
- 49:32Questions
- 54:45A Bad Declaration
related talks
01h 17mDevelopment strategies: You've written a library - now what?
33m“Don't package your libraries, write packagable libraries!”
01h 19mNavigating the development and evolution of a library
01h 02m“How to Write Effective Documentation for C++ Libraries..."
06mLightning Talk: Best Practices Every C++ Programmer Needs to Follow
40mLessons from two decades of writing bad code
47mAdventures with C++ Legacy Codebases: Tales of Incremental Improvement
52m“Tools from the C++ eco-system to save a leg”
