Efficient and Reliable Wrapping of C APIs Using Modern C++

Vladimir Vishnevskii

⏱ 90 minute session
beginner
intermediate
advanced
16:00-17:30, Friday, 19th April 2024
Safe and efficient usage of C based frameworks from C++ code may require introduction of an intermediate layer to employ compile time safety mechanisms and adapt C procedural API for C++ features and control structures. The presentation, using a case study approach, will cover topics such as adapter interface design according to modern C++ best practices, overhead avoidance techniques, application of compile time computation and compile time enforced safety. The talk will inspect and highlight C++ features and standard utilities (up to C++23 standard) that can be used to efficiently and reliably wrap C APIs in modern C++ code. Performance implications of various design decisions will be analyzed and trade-offs between usability and efficiency will be discussed. Substantial part of the talk will be dedicated to design and implementation techniques enabling comprehensive unit testing of the wrapper code.
🏷 c++20
🏷 c++23
🏷 design

Vladimir Vishnevskii

Vladimir is a practicing software engineer using C++ as a primary tool since 2003. His area of interest is development of high-quality software for distributed and embedded systems. If Vladimir sees an interesting topic that could be beneficial for the community, he shares his experience in the form of conference presentations.