C++ is nice, but one of its major disadvantages is that it's not easy or fun to FFI to it from other languages. Since name mangling, std::string layout, and so on are completely unspecified, other languages have a really really hard time interacting with C++ functions, even when the bindings are auto-generated by a C++ compiler.
waved needs to offer a C API - or else people simply won't be able to use it. The C API can't include any C++ classes/templates such as std::string, since that can't be created or touched by other languages.
All functionality of waved needs to be accessible - the C API should be the main interface (even if it uses C++ internally). If you do this right, not only will people be able to use it directly in applications but a robust display server can be implemented in a language like Rust with little friction.
C++ is nice, but one of its major disadvantages is that it's not easy or fun to FFI to it from other languages. Since name mangling,
std::string
layout, and so on are completely unspecified, other languages have a really really hard time interacting with C++ functions, even when the bindings are auto-generated by a C++ compiler.waved
needs to offer a C API - or else people simply won't be able to use it. The C API can't include any C++ classes/templates such asstd::string
, since that can't be created or touched by other languages.All functionality of
waved
needs to be accessible - the C API should be the main interface (even if it uses C++ internally). If you do this right, not only will people be able to use it directly in applications but a robust display server can be implemented in a language like Rust with little friction.