Hi Andrew,
That’s very interesting. May I ask that the RUST code is binded into the C++ order it is compiled to native lib which is compatible with C++ ?
The Rust code must first be complied to a system dynamic library
–crate-type=cdylib, #![crate_type = “cdylib”] - A dynamic system library will be produced. This is used when compiling a dynamic library to be loaded from another language. This output type will create *.so files on Linux, *.dylib files on macOS, and *.dll files on Windows.
Thanks for sharing! I had attempted a simple plugin before, but Rust FFI is not for the uninitiated, I learned quite a lot when checking out your code.
Am I correct in assuming the bindgen approach could be extended into a base library that would allow others to create pure (safe) Rust plugins?
Thanks a lot! I will try it out and see if I can expand on it. Would be great to gain the possibility of creating pure Rust plugins with an idiomatic API.