Closed G4Vi closed 4 months ago
could we wrap the C API in a CPP SDK? we know we want to support C, with as few dependencies as possible.
The C API is kind of two APIs wrapped into one right now. The imports from dylibso:observe/api
that pass strings as ptr and length separately as uint32_t
s and the wrappers that take null terminated strings. We'd want to use the former to implement the c++ sdk as the common std::string
implementations store the length of the string so it doesn't need to be computed again.
Currently the observe api may be used in C++, but requires using raw pointers to pass strings. It would nice to be able to use
std::string
to pass strings instead.