randomPoison / cs-bindgen

Experiment in using Rust to build a library that can be loaded by Unity across multiple platforms
4 stars 0 forks source link

Support String arguments in cs_bindgen functions #12

Closed randomPoison closed 4 years ago

randomPoison commented 4 years ago

In addition to adding support for String arguments, I've also tweaked how returning strings works. We no longer to inject an extra out parameter in order to get the length of the string. Instead, we return a whole struct RawString (RustOwnedString on the C# side). This simplifies code generation nicely.