Hello, world. Brand new poster here though I posted similar messages in other language forums. I hope this is the right place to ask because my question is half about existing stuff and half about prospective work.
I am considering starting with Rust amid a C++ code base. New Rust code would need to somehow integrate with the existing C++ code. The C++ code is the expected melange of free functions, classes, what have you and uses STL and Boost (also other libs less prominently). Allow me to ask:
What is the current support for calling C/C++ free functions from Rust? What level of mangling is supported? What data types can be passed without translation from Rust to C/C++?
How about template functions? Is it possible to call a C++ template function from Rust?
How can a C++ object be used from Rust? Can C++ methods be called from Rust? The question applies to value types - no virtuals - and polymorphic types with virtuals, inheritance etc. And of course simple C structs.
How about template objects? One issue is that many C++ interfaces pass std::string and std::map<…, …> as parameters. How feasible is to manipulate such objects in Rust?
How about the other way? Can a C/C++ function call a Rust function?
I would appreciate any pointers you have to how-to materials. In equal measure I am interested in plans to address such issues in the foreseeable future. Thankyou.