4 ms·
Interesting — does the Rust crate export a C API then?
by binary132 3y ago
Interesting — does the Rust crate export a C API then?
- rklaehn 3y agoNot officially. We currently have bindings for rust, python, golang and swift. These were the most asked for bindings (python for ml, golang for networking and swift for ios apps). We are using uniffi https://mozilla.github.io/uniffi-rs/ https://mozilla.github.io/uniffi-rs/ Would you need C or C++ bindings?
- binary132 3y agoAh, I see. Hm. I might be interested in a C API since that could be used in C, C++, and Lua equally well. I really was just wondering what the common implementation between the bindings was since it struck me as unusual that there would be a number of bindings but not C (which is AIUI the only interface besides Rust that Rust can really export.)
- rklaehn 3y agoSo, I am not the one that is doing the bindings, so take this with a grain of salt. It seems uniffi does create C compatible bindings in order to make bindings for all these other languages. But these are internal bindings that are ugly and not intended to be used externally.
- binary132 3y agoPerhaps if an issue were opened describing the necessary steps to provide a fluent and stable C API, staying consistent with the uniffi approach you're using for the other wrappers, then someone enterprising could pick up the ball and run with it. :)