Been doing some Zig/C++ interop. I wrote this today to share some of the ideas and techniques I’m using: Zig C++ Interop Blog Post
17 Likes
Thats a cool idea. I wonder if you can create zig function which would work similarly to you macros generated opaque and concrete.
Btw what happend to your previous post? It feels like everything except for into was deleted.
That’s in a nutshell why C++ should die, or at least be reduced to an implementation detail behind a proper C API ![]()
(e.g. to elaborate: IMHO a C++ library which exposes C++ stdlib types in its public API, especially types that require RAII-tracking like std::vector, std::string or std::shared_ptr in its public API is poorly designed IMHO, it will even cause problems within niches of the C++ ecosystem - like in gamedev where C++ stdlib usage is typically banned).