Right now the C++ api uses nullterminated const char* everywhere which is nice for C (and ultimiately Rust) interop.
However, passing in std::string can get a bit clumsy:
rec.log(
(std::string("world/") + name + "_pt").c_str(),
rerun::Points3D({pos}).with_colors(color)
);
The modern way is to use std::string_view but the problem is that they are not guaranteed to be nullterminated, complicating the FFI - either C needs to get more complex string types as well or we do a temp allocation for this!
Right now the C++ api uses nullterminated
const char*everywhere which is nice for C (and ultimiately Rust) interop.However, passing in std::string can get a bit clumsy:
rec.log( (std::string("world/") + name + "_pt").c_str(), rerun::Points3D({pos}).with_colors(color) );The modern way is to use
std::string_viewbut the problem is that they are not guaranteed to be nullterminated, complicating the FFI - either C needs to get more complex string types as well or we do a temp allocation for this!