News for hackers. Stuff that matters.
Re:C++20, How Hard Could It Be by sudosysgen on Sunday September 25, 2022 @04:40PM (#32975959)
Rust can't easily bind to many modern, high performance C++ libraries because it lacks a fair amount of the semantics of C++.
Re:C++20, How Hard Could It Be by phoehne on Sunday September 25, 2022 @04:53PM (#32976092)
I think that may be a red herring. We normally don't link to name mangled C++ libraries, anyway. Most libraries export their useful symbols in de-mangled format for linking to other languages. That way you can basically dlopen and look for the symbol. There are some libraries that are really only intended to be called from C++ and I don't expect anything other than C++ to use those libraries. I'm not sure if Ruby or Python (for example) can deal with mangled names. I think there are some tools that will generate wrappers to make them callable from things that don't understand mangled names, but if you want to make your stuff interoperable - make it C callable.

It isn't that hard to define something like MyType_t which is a pointer. Then some C code to allocate to wrap the MyType so the type is usable from any language.

Re:C++20, How Hard Could It Be by jandrewrogers on Sunday September 25, 2022 @09:15PM (#32978268)
I don't think this is a material limitation. Anecdotally, we have few issues with sensibly blending C++20 and Rust. Any exported APIs will need to be circumscribed anyway for integrating with other languages.